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.

ion.tf 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. data "akamai_property_rules_template" "template-update" {
  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"
  10. value = "${var.origin}"
  11. type = "string"
  12. }
  13. variables {
  14. name = "cpcode"
  15. value = "${var.cpcode}"
  16. type = "number"
  17. }
  18. }
  19. resource "akamai_property" "ion_premier" {
  20. name = "${var.prefix}-${var.program}"
  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.prefix}${var.hostname}"
  26. cname_to = var.edge_hostname
  27. cert_provisioning_type = "CPS_MANAGED"
  28. }
  29. rule_format = "latest"
  30. rules = data.akamai_property_rules_template.template-update.json
  31. }
  32. output "property_id" {
  33. value = "${akamai_property.ion_premier.id}"
  34. }
  35. output "property_version" {
  36. value = "${akamai_property.ion_premier.latest_version}"
  37. }
  38. resource "akamai_property_activation" "activation_staging" {
  39. property_id = "${akamai_property.ion_premier.id}"
  40. version = "${akamai_property.ion_premier.latest_version}"
  41. network = "${var.network}"
  42. contact = ["${var.prefix}@akamai.com"]
  43. note = "Automatic deployment for ${var.program} Lab"
  44. }