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.

property.tf 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. data "akamai_property_rules_template" "rules-template" {
  2. template_file = abspath("${path.root}/modules/property/property-snippets/main.json")
  3. variables {
  4. name = "secure"
  5. value = "${var.secure}"
  6. type = "bool"
  7. }
  8. variables {
  9. name = "cp_code_id"
  10. value = "${var.cp_code_id}"
  11. type = "number"
  12. }
  13. variables {
  14. name = "user_id"
  15. value = "${var.user_id}"
  16. type = "string"
  17. }
  18. variables {
  19. name = "cloudlet_policy_id"
  20. value = "${var.cloudlet_policy_id}"
  21. type = "number"
  22. }
  23. variables {
  24. name = "edgeworker_id"
  25. value = "${var.edgeworker_id}"
  26. type = "string"
  27. }
  28. }
  29. resource "akamai_property" "lab_property" {
  30. name = "${var.user_id}-tflab"
  31. product_id = "prd_${var.product_id}"
  32. contract_id = "ctr_${var.contract_id}"
  33. group_id = "grp_${var.group_id}"
  34. hostnames {
  35. cname_from = "${var.user_id}tflab.akaudevops.com"
  36. cname_to = var.edge_hostname
  37. cert_provisioning_type = "CPS_MANAGED"
  38. }
  39. hostnames{
  40. cname_from = "${var.user_id}tflab-test.akaudevops.com"
  41. cname_to = var.edge_hostname
  42. cert_provisioning_type = "CPS_MANAGED"
  43. }
  44. rule_format = var.rule_format
  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. }