|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- data "akamai_property_rules_template" "rules-template" {
- template_file = abspath("${path.root}/property-snippets/main.json")
- variables {
- name = "secure"
- value = "${var.secure}"
- type = "bool"
- }
- variables {
- name = "origin_hostname"
- value = "${var.origin_hostname}"
- type = "string"
- }
- variables {
- name = "cp_code_id"
- value = "${var.cp_code_id}"
- type = "number"
- }
- variables {
- name = "cp_code_name"
- value = "${var.cp_code_name}"
- type = "string"
- }
- variables {
- name = "LDAPID"
- value = "${var.LDAPID}"
- type = "string"
- }
- variables {
- name = "labname"
- value = "${var.labname}"
- type = "string"
- }
- variables {
- name = "hostname"
- value = "${var.hostname}"
- type = "string"
- }
- }
-
- resource "akamai_property" "lab_property" {
- name = "${var.LDAPID}-${var.labname}"
- product_id = "prd_SPM"
- contract_id = "ctr_${var.contract_id}"
- group_id = "grp_${var.group_id}"
- hostnames {
- cname_from = "${var.LDAPID}${var.labname}.${var.hostname}"
- cname_to = var.edge_hostname
- cert_provisioning_type = "CPS_MANAGED"
- }
- hostnames {
- cname_from = "${var.LDAPID}${var.labname}-test.${var.hostname}"
- cname_to = var.edge_hostname
- cert_provisioning_type = "CPS_MANAGED"
- }
- rule_format = "latest"
- rules = data.akamai_property_rules_template.rules-template.json
- }
-
- output "property_id" {
- value = "${akamai_property.lab_property.id}"
- }
- output "property_version" {
- value = "${akamai_property.lab_property.latest_version}"
- }
-
- resource "akamai_property_activation" "activation_staging" {
- property_id = "${akamai_property.lab_property.id}"
- version = "${akamai_property.lab_property.latest_version}"
- network = "${var.network}"
- contact = ["${var.email}"]
- note = "Terraform property creation lab"
- auto_acknowledge_rule_warnings = true
- }
|