選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

property.tf 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. terraform {
  2. required_providers {
  3. akamai = {
  4. source = "akamai/akamai"
  5. version = ">= 6.5.0"
  6. }
  7. }
  8. required_version = ">= 1.0"
  9. }
  10. provider "akamai" {
  11. edgerc = var.edgerc_path
  12. config_section = var.config_section
  13. }
  14. data "akamai_property_rules_template" "rules" {
  15. template_file = abspath("${path.module}/property-snippets/main.json")
  16. variables {
  17. name = "edgeworker_id"
  18. value = akamai_edgeworker.geo_languagecookie.id
  19. type = "string"
  20. }
  21. }
  22. # resource "akamai_edge_hostname" "akaudevops-com-edgekey-net" {
  23. # contract_id = var.contract_id
  24. # group_id = var.group_id
  25. # ip_behavior = "IPV6_COMPLIANCE"
  26. # edge_hostname = "akaudevops.com.edgekey.net"
  27. # certificate = 189619
  28. # }
  29. resource "akamai_property" "devops0caa-tflab" {
  30. name = "devops0caa-tflab"
  31. contract_id = var.contract_id
  32. group_id = var.group_id
  33. product_id = "prd_SPM"
  34. hostnames {
  35. cname_from = "devops0caatflab-test.akaudevops.com"
  36. cname_to = "akaudevops.com.edgekey.net"
  37. cert_provisioning_type = "CPS_MANAGED"
  38. }
  39. hostnames {
  40. cname_from = "devops0caatflab.akaudevops.com"
  41. cname_to = "akaudevops.com.edgekey.net"
  42. cert_provisioning_type = "CPS_MANAGED"
  43. }
  44. rule_format = "latest"
  45. rules = data.akamai_property_rules_template.rules.json
  46. }
  47. # NOTE: Be careful when removing this resource as you can disable traffic
  48. resource "akamai_property_activation" "devops0caa-tflab-staging" {
  49. property_id = akamai_property.devops0caa-tflab.id
  50. contact = ["devops0caa@akaudevops.com"]
  51. version = akamai_property.devops0caa-tflab.latest_version
  52. network = "STAGING"
  53. note = "Terraform property creation lab"
  54. auto_acknowledge_rule_warnings = true
  55. }
  56. # NOTE: Be careful when removing this resource as you can disable traffic
  57. #resource "akamai_property_activation" "devops0caa-tflab-production" {
  58. # property_id = akamai_property.devops0caa-tflab.id
  59. # contact = []
  60. # version = var.activate_latest_on_production ? akamai_property.devops0caa-tflab.latest_version : akamai_property.devops0caa-tflab.production_version
  61. # network = "PRODUCTION"
  62. # auto_acknowledge_rule_warnings = false
  63. #}