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
}
Changes to Outputs:
+ my_property = {
+ contract_id = "ctr_C-0N7RAC7"
+ group_id = "grp_12345"
+ id = "prp_123456"
+ latest_version = 1
+ name = "my-property-1"
+ note = ""
+ product_id = "prd_Obj_Delivery"
+ production_version = 0
+ property_id = "prp_123456"
+ rule_format = "v2024-05-31"
+ rules = jsonencode(
{
+ accountId = "act_A-CCT1234"
+ contractId = "ctr_C-0N7RAC7"
+ etag = "12a3b4567cd8e9012f34567g89hi01j23kl4567"
+ groupId = "grp_12345"
+ propertyId = "prp_123456"
+ propertyVersion = 1
+ ruleFormat = "v2024-05-31"
+ rules = {
+ behaviors = [
+ {
+ name = "origin"
+ options = {
+ cacheKeyHostname = "ORIGIN_HOSTNAME"
+ compress = true
+ enableTrueClientIp = true
+ forwardHostHeader = "REQUEST_HOST_HEADER"
+ hostname = "1abcd2e34-www.example.com"
+ httpPort = 80
+ httpsPort = 443
+ minTlsVersion = "TLSV1_3"
+ 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 = "UNKNOWN"
+ gcsAccessKeyVersionGuid = "12abcd3ef-45gh-67ij-890k-l1m23456n7o"
+ originLocationTitle = ""
}
},
+ {
+ name = "contentCharacteristics"
+ options = {
+ catalogSize = "UNKNOWN"
+ contentType = "UNKNOWN"
+ objectSize = "UNKNOWN"
+ popularityDistribution = "UNKNOWN"
}
},
+ {
+ name = "clientCharacteristics"
+ options = {
+ country = "UNKNOWN"
}
},
+ {
+ name = "restrictObjectCaching"
+ options = {
+ maximumSize = ""
}
},
+ {
+ name = "cpCode"
+ options = {
+ value = {
+ createdDate = 1708523914000
+ description = "My code"
+ id = 123456
+ name = "My CP code"
+ products = [
+ "Obj_Delivery",
]
}
}
},
+ {
+ name = "dynamicThroughtputOptimization"
+ options = {
+ enabled = true
}
},
+ {
+ name = "http3"
+ 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 |
---|---|
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. |
Updated 3 months ago