您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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