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

configuration.tf 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. hostnames {
  30. cname_from = "${var.UserID}${var.labname}-test.${var.hostname}"
  31. cname_to = var.edge_hostname
  32. cert_provisioning_type = "CPS_MANAGED"
  33. }
  34. rule_format = "latest"
  35. rules = data.akamai_property_rules_template.rules-template.json
  36. }
  37. output "property_id" {
  38. value = "${akamai_property.lab_property.id}"
  39. }
  40. output "property_version" {
  41. value = "${akamai_property.lab_property.latest_version}"
  42. }
  43. resource "akamai_property_activation" "activation_staging" {
  44. property_id = "${akamai_property.lab_property.id}"
  45. version = "${akamai_property.lab_property.latest_version}"
  46. network = "${var.network}"
  47. contact = ["${var.email}"]
  48. note = "Terraform property creation lab"
  49. auto_acknowledge_rule_warnings = true
  50. }