|
|
@@ -0,0 +1,47 @@ |
|
|
|
data "akamai_property_rules_template" "template-update" { |
|
|
|
template_file = abspath("${path.root}/property-snippets/main.json") |
|
|
|
variables { |
|
|
|
name = "secure" |
|
|
|
value = "${var.secure}" |
|
|
|
type = "bool" |
|
|
|
} |
|
|
|
variables { |
|
|
|
name = "origin" |
|
|
|
value = "${var.origin}" |
|
|
|
type = "string" |
|
|
|
} |
|
|
|
variables { |
|
|
|
name = "cpcode" |
|
|
|
value = "${var.cpcode}" |
|
|
|
type = "number" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
resource "akamai_property" "ion_premier" { |
|
|
|
name = "${var.prefix}-${var.program}" |
|
|
|
product_id = "prd_SPM" |
|
|
|
contract_id = "ctr_${var.contract_id}" |
|
|
|
group_id = "grp_${var.group_id}" |
|
|
|
hostnames { |
|
|
|
cname_from = "${var.prefix}${var.hostname}" |
|
|
|
cname_to = var.edge_hostname |
|
|
|
cert_provisioning_type = "CPS_MANAGED" |
|
|
|
} |
|
|
|
rule_format = "latest" |
|
|
|
rules = data.akamai_property_rules_template.template-update.json |
|
|
|
} |
|
|
|
|
|
|
|
output "property_id" { |
|
|
|
value = "${akamai_property.ion_premier.id}" |
|
|
|
} |
|
|
|
output "property_version" { |
|
|
|
value = "${akamai_property.ion_premier.latest_version}" |
|
|
|
} |
|
|
|
|
|
|
|
resource "akamai_property_activation" "activation_staging" { |
|
|
|
property_id = "${akamai_property.ion_premier.id}" |
|
|
|
version = "${akamai_property.ion_premier.latest_version}" |
|
|
|
network = "${var.network}" |
|
|
|
contact = ["${var.prefix}@akamai.com"] |
|
|
|
note = "Automatic deployment for ${var.program} Lab" |
|
|
|
} |