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.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. variables {
  19. name = "UserID"
  20. value = "${var.UserID}"
  21. type = "string"
  22. }
  23. variables {
  24. name = "labname"
  25. value = "${var.labname}"
  26. type = "string"
  27. }
  28. }
  29. resource "akamai_property" "lab_property" {
  30. name = "${var.UserID}-${var.labname}"
  31. product_id = "prd_SPM"
  32. contract_id = "ctr_${var.contract_id}"
  33. group_id = "grp_${var.group_id}"
  34. hostnames {
  35. cname_from = "${var.UserID}${var.labname}.${var.hostname}"
  36. cname_to = var.edge_hostname
  37. cert_provisioning_type = "CPS_MANAGED"
  38. }
  39. hostnames {
  40. cname_from = "${var.UserID}${var.labname}-test.${var.hostname}"
  41. cname_to = var.edge_hostname
  42. cert_provisioning_type = "CPS_MANAGED"
  43. }
  44. rule_format = "latest"
  45. rules = data.akamai_property_rules_template.rules-template.json
  46. }
  47. output "property_id" {
  48. value = "${akamai_property.lab_property.id}"
  49. }
  50. output "property_version" {
  51. value = "${akamai_property.lab_property.latest_version}"
  52. }
  53. resource "akamai_property_activation" "activation_staging" {
  54. property_id = "${akamai_property.lab_property.id}"
  55. version = "${akamai_property.lab_property.latest_version}"
  56. network = "${var.network}"
  57. contact = ["${var.email}"]
  58. note = "Terraform property creation lab"
  59. auto_acknowledge_rule_warnings = true
  60. }