1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- data "akamai_property_rules_template" "rules-template" {
- template_file = abspath("${path.root}/modules/property/property-snippets/main.json")
- variables {
- name = "secure"
- value = "${var.secure}"
- type = "bool"
- }
-
- variables {
- name = "cp_code_id"
- value = "${var.cp_code_id}"
- type = "number"
- }
-
- variables {
- name = "user_id"
- value = "${var.user_id}"
- type = "string"
- }
-
- variables {
- name = "cloudlet_policy_id"
- value = "${var.cloudlet_policy_id}"
- type = "number"
- }
-
- variables {
- name = "edgeworker_id"
- value = "${var.edgeworker_id}"
- type = "string"
- }
- }
-
- resource "akamai_property" "lab_property" {
- name = "${var.user_id}-tflab"
- product_id = "prd_${var.product_id}"
- contract_id = "ctr_${var.contract_id}"
- group_id = "grp_${var.group_id}"
- hostnames {
- cname_from = "${var.user_id}tflab.akaudevops.com"
- cname_to = var.edge_hostname
- cert_provisioning_type = "CPS_MANAGED"
- }
- hostnames{
- cname_from = "${var.user_id}tflab-test.akaudevops.com"
- cname_to = var.edge_hostname
- cert_provisioning_type = "CPS_MANAGED"
- }
-
- rule_format = var.rule_format
- 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
- }
|