You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configuration.tf 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. data "akamai_property_rules_template" "rules-template" {
  2. template_file = abspath("${path.root}/property-snippets/main.json")
  3. variables {
  4. name = "secure"
  5. value = "${var.secure}"
  6. type = "bool"
  7. }
  8. variables {
  9. name = "origin_hostname"
  10. value = "${var.origin_hostname}"
  11. type = "string"
  12. }
  13. variables {
  14. name = "cp_code_id"
  15. value = "${var.cp_code_id}"
  16. type = "number"
  17. }
  18. }
  19. resource "akamai_property" "lab_property" {
  20. name = "${var.UserID}-${var.labname}"
  21. product_id = "prd_SPM"
  22. contract_id = "ctr_${var.contract_id}"
  23. group_id = "grp_${var.group_id}"
  24. hostnames {
  25. cname_from = "${var.UserID}${var.labname}.${var.hostname}"
  26. cname_to = var.edge_hostname
  27. cert_provisioning_type = "CPS_MANAGED"
  28. }
  29. rule_format = "latest"
  30. rules = data.akamai_property_rules_template.rules-template.json
  31. }
  32. output "property_id" {
  33. value = "${akamai_property.lab_property.id}"
  34. }
  35. output "property_version" {
  36. value = "${akamai_property.lab_property.latest_version}"
  37. }
  38. resource "akamai_property_activation" "activation_staging" {
  39. property_id = "${akamai_property.lab_property.id}"
  40. version = "${akamai_property.lab_property.latest_version}"
  41. network = "${var.network}"
  42. contact = ["${var.email}"]
  43. note = "Terraform property creation lab"
  44. auto_acknowledge_rule_warnings = true
  45. }