Property

Retrieve a property's ID and rule tree based on the given property name.

data "akamai_property" "my_property" {
  name    = "my-property-1"
  version = "1"
}

output "my_property" {
  value = data.akamai_property.my_property
}
my_property = {
      asset_id           = "aid_12345"
      contract_id        = "ctr_C-0N7RAC7"
      group_id           = "grp_12345"
      id                 = "prp_12345"
      latest_version     = 1
      name               = "my-property-1"
      note               = ""
      product_id         = "prd_Obj_Delivery"
      production_version = 0
      property_id        = "prp_12345"
      property_type      = ""
      rule_format        = "v2024-05-31"
      rules              = jsonencode(
            {
              accountId       = "act_A-CCT1234"
              contractId      = "ctr_C-0N7RAC7"
              etag            = "12a3b4567cd8e9012f34567g89hi01j23kl4567"
              groupId         = "grp_12345"
              propertyId      = "prp_12345"
              propertyVersion = 1
              ruleFormat      = "v2024-05-31"
              rules           = {
                  behaviors = [
                      {
                          name    = "origin"
                          options = {
                              cacheKeyHostname          = "ORIGIN_HOSTNAME"
                              compress                  = true
                              enableTrueClientIp        = true
                              forwardHostHeader         = "REQUEST_HOST_HEADER"
                              hostname                  = "example.com"
                              httpPort                  = 80
                              httpsPort                 = 443
                              ipVersion                 = "IPV4"
                              minTlsVersion             = "DYNAMIC"
                              originCertificate         = ""
                              originSni                 = true
                              originType                = "CUSTOMER"
                              ports                     = ""
                              trueClientIpClientSetting = false
                              trueClientIpHeader        = "True-Client-IP"
                              verificationMode          = "PLATFORM_SETTINGS"
                            }
                        },
                      {
                          name    = "originCharacteristics"
                          options = {
                              accessKeyEncryptedStorage = true
                              authenticationMethod      = "GCS_HMAC_AUTHENTICATION"
                              authenticationMethodTitle = ""
                              country                   = "NORTH_AMERICA"
                              gcsAccessKeyVersionGuid   = "12abcd3ef-45gh-67ij-890k-l1m23456n7o"
                              originLocationTitle       = ""
                            }
                        },
                      {
                          name    = "contentCharacteristics"
                          options = {
                              catalogSize            = "MEDIUM"
                              contentType            = "USER_GENERATED"
                              objectSize             = "LESS_THAN_1MB"
                              popularityDistribution = "LONG_TAIL"
                            }
                        },
                      {
                          name    = "clientCharacteristics"
                          options = {
                              country = "NORTH_AMERICA"
                            }
                        },
                      {
                          name    = "restrictObjectCaching"
                          options = {
                              maximumSize = ""
                            }
                        },
                      {
                          name    = "cpCode"
                          options = {
                              value = {
                                  createdDate = 1708523914000
                                  description = "My code"
                                  id          = 12345
                                  name        = "My CP code"
                                  products    = [
                                      "Obj_Delivery",
                                    ]
                                }
                            }
                        },
                      {
                          name    = "dynamicThroughtputOptimization"
                          options = {
                              enabled = true
                            }
                        },
                      {
                          name    = "http2"
                          options = {
                              enable = false
                            }
                        },
                    ]
                  name      = "default"
                  options   = {}
                }
            }
        )
      staging_version    = 2
      version            = 1
    }

Arguments

Pass your property name and an optional version of the property in the body of the declaration to get the property's ID and rule tree.

Attributes

Returned to you is a product ID with its details.

AttributeDescription
asset_idAn alternative identifier for the property. Use this value to key the property in the akamai_iam_blocked_user_properties resource.
contract_idYour contract's ID.
group_idYour group's ID.
idThe property's ID.
latest_versionThe version of the property you've created or updated rules for.
nameA human-readable, descriptive name for the property.
noteA human-readable message about the property version.
product_idThe product's ID.
production_versionThe property version currently active on the production network. When it's value is 0, it's not active on production.
property_idThe property's ID.
rule_formatA versioned rule schema and set of available behaviors and criteria. If not provided, we apply the latest rule format by default.
rulesA JSON-encoded rule tree for the given property.
staging_versionThe property version currently active on the staging network. When it's value is 0, it's not active on staging.
versionThe property's current version.
property_typeThe property type. Applies only to properties of the HOSTNAME_BUCKET type.