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.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 = "cpcodeId"
  15. value = "${var.cpcodeId}"
  16. type = "number"
  17. }
  18. variables {
  19. name = "cpcodeName"
  20. value = "${var.cpcodeName}"
  21. type = "string"
  22. }
  23. }
  24. resource "akamai_property" "ion_premier" {
  25. name = "${var.UserID}-${var.program}"
  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.program}.${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.template-update.json
  36. }
  37. output "property_id" {
  38. value = "${akamai_property.ion_premier.id}"
  39. }
  40. output "property_version" {
  41. value = "${akamai_property.ion_premier.latest_version}"
  42. }
  43. resource "akamai_property_activation" "activation_staging" {
  44. property_id = "${akamai_property.ion_premier.id}"
  45. version = "${akamai_property.ion_premier.latest_version}"
  46. network = "${var.network}"
  47. contact = ["${var.email}"]
  48. note = "Automatic deployment for CLI Lab"
  49. auto_acknowledge_rule_warnings = true
  50. }