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.

пре 1 година
пре 1 година
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. }
  24. resource "akamai_property" "lab_property" {
  25. name = "${var.UserID}-${var.labname}"
  26. product_id = "prd_SPM"
  27. contract_id = "ctr_${var.contract_id}"
  28. group_id = "grp_${var.group_id}"
  29. hostnames {
  30. cname_from = "${var.UserID}${var.labname}.${var.hostname}"
  31. cname_to = var.edge_hostname
  32. cert_provisioning_type = "CPS_MANAGED"
  33. }
  34. hostnames {
  35. cname_from = "${var.UserID}${var.labname}-test.${var.hostname}"
  36. cname_to = var.edge_hostname
  37. cert_provisioning_type = "CPS_MANAGED"
  38. }
  39. rule_format = "latest"
  40. rules = data.akamai_property_rules_template.rules-template.json
  41. }
  42. output "property_id" {
  43. value = "${akamai_property.lab_property.id}"
  44. }
  45. output "property_version" {
  46. value = "${akamai_property.lab_property.latest_version}"
  47. }
  48. resource "akamai_property_activation" "activation_staging" {
  49. property_id = "${akamai_property.lab_property.id}"
  50. version = "${akamai_property.lab_property.latest_version}"
  51. network = "${var.network}"
  52. contact = ["${var.email}"]
  53. note = "Terraform property creation lab"
  54. auto_acknowledge_rule_warnings = true
  55. }