Property

akamai_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.

Attribute Description
asset_id An alternative identifier for the property. Use this value to key the property in the akamai_iam_blocked_user_properties resource.
contract_id Your contract's ID.
group_id Your group's ID.
id The property's ID.
latest_version The version of the property you've created or updated rules for.
name A human-readable, descriptive name for the property.
note A human-readable message about the property version.
product_id The product's ID.
production_version The property version currently active on the production network. When it's value is 0, it's not active on production.
property_id The property's ID.
rule_format A versioned rule schema and set of available behaviors and criteria. If not provided, we apply the latest rule format by default.
rules A JSON-encoded rule tree for the given property.
staging_version The property version currently active on the staging network. When it's value is 0, it's not active on staging.
version The property's current version.
property_type The property type. Applies only to properties of the HOSTNAME_BUCKET type.