GuideReference
Guide

Property

akamai_property

Create, update, move, or remove a property configuration.

  • Create a property with a default set of rules that provide basic services and protections. You can also create a new property with an existing set of rules using the rules argument.

  • Update a property's rules or hostnames.

  • Move an activated or previously activated property to a parent, sibling, or child group. There are two exceptions, however.

    • The property you want to move cannot have a Datastream as the Datastream asset does not move to the destination group. To accomplish a move, you have to create a new property and Datastream in the destination group that mirror the source assets.
    • Properties that use cloud access keys will move, but the source group's key is not available for use in the destination group. You need to update the key in the destination group before you can activate the configuration.

    To move a property, import the property you want to move into your state and pass the destination group's ID as the value of group_id.

  • Remove a property by running terraform destroy.

resource "akamai_property" "my_property" {
  name        = "MyProperty"
  product_id  = "prd_Object_Delivery"
  contract_id = "C-0N7RAC7"
  group_id    = "12345"
}
resource "akamai_property" "my_property" {
  name          = "MyProperty"
  product_id    = "prd_Object_Delivery"
  contract_id   = "C-0N7RAC7"
  group_id      = "12345"
  rule_format   = "v2023-05-30"
  version_notes = "Sample notes"
  rules         = file("${path.root}/property-snippets/main.json")
  hostnames {
    cname_from             = "example.com"
    cname_to               = "example.com.edgekey.net"
    cert_provisioning_type = "DEFAULT"
  }
}

Arguments

Pass a property name and your contract and product IDs to create or manage a property.

Argument Required Description
name A human-readable name you give to identify your property.
contract_id Your contract ID.
group_id The group ID to which the property belongs.
product_id A product ID including the prd_ prefix. See Common identifiers for a list of product IDs.
hostnames A mapping of public hostnames to edge hostnames. If used, include these additional required arguments:
  • cname_from. Your origin's hostname.
  • cname_to. The hostname for edge content.
  • cert_provisioning_type. Your certificate's provisioning type. Either CPS_MANAGED for custom certificates you provision or DEFAULT for certificates provisioned automatically.
Note: When the DEFAULT certificate's production or staging status is PENDING, EXPIRING_SOON_NEEDS_VALIDATION, or EXPIRED_NEEDS_VALIDATION, perform a domain validation to prove you control the domain. You can do this by adding a CNAME record to your DNS.
rules The location of your rules. Use the path to a local file or a variable that represents the output of the Rules builder or Rules template data source.
rule_format A versioned rule schema and set of available behaviors and criteria. If not provided, we apply the latest rule format by default. Run the Rule formats data source for a list of supported rule formats.
version_notes Human-readable notes about your property's version.

Attributes

If you've not set an output method, the response only provides a property ID in the success message.

Setting an output method returns the property details you provided on create along with these computed attributes.

Attribute Description
id Your property's ID.
asset_id Your property's alternative ID. Use this ID in the Identity and Access Management subprovider when creating a Blocked user properties resource.
rule_errors Any errors returned by the API.
rule_warnings Any rule warnings returned by the API.
latest_version The version of the property you've created or updated rules for. We use the latest version or create a new version if latest is not editable.
production_version The current property version active on the Akamai production network.
staging_version The current property version active on the Akamai staging network.
hostnames A mapping of public hostnames to edge hostnames. If used, it returns these computed attributes:
  • cname_type. A hostname's CNAME type. Supports only the EDGE_HOSTNAME value.
  • edge_hostname_id. An edge hostname's ID.
  • cert_status. A certificate's status details.
    • hostname. The hostname part of the CNAME record used to validate the certificate's domain.
    • production_status. The certificate's deployment status on the production network.
    • staging_status. The certificate's deployment status on the staging network.
    • target. The destination part of the CNAME record used to validate the certificate's domain.
read_version The required property's version to be read.