GuideReference
TrainingSupportCommunity
Guide

Access key

akamai_cloudaccess_key

 Average processing time per key version 10–15 minutes

Create, update, or delete a cloud-origin access key or access key version.

resource "akamai_cloudaccess_key" "my_access_key" {
  access_key_name       = "MyAccessKey"
  authentication_method = "AWS4_HMAC_SHA256"
  contract_id           = "C-0N7RAC7"
  credentials_a = {
    cloud_access_key_id     = "ABCDEFGHIJKL1"
    cloud_secret_access_key = "aBcdeFgHiJKLM/n1oPQRS/Tw2xY345Z"
    primary_key             = true
  }
  credentials_b = {
    cloud_access_key_id     = "ABCDEFGHIJKL2"
    cloud_secret_access_key = "AbcDefGhijKLm/n3opqrs/tW45X67yZ"
    primary_key             = false
  }
  group_id = 12345
  network_configuration = {
    security_network = "ENHANCED_TLS"
    additional_cdn   = "CHINA_CDN"
  }
  timeouts = {
    create = "30m"
    update = "30m"
    delete = "30m"
  }
}
variable "access_key_name" {
  type        = string
  description = "My cloud-origin access key name"
  default     = ""
}
// local
access_key_name = akamai_cloudaccess_key.my_access_key.access_key_name

// tvars
access_key_name = var.access_key_name

Arguments

Provide a key name, the authentication method, your contract, and group to create an access key.

ArgumentRequiredDescription
access_key_nameA human-readable name for your access key.
authentication_methodThe type of authentication. Value is one of:
  • AWS4_HMAC_SHA256 for Amazon Web Services.
  • GOOG4_HMAC_SHA256 for Google Cloud Storage.
group_idYour group ID.
contract_idYour contract ID.
credentials_a/credentials_bYour cloud access credentials. Requires at least one set of credentials upon creation. Contains:
  • cloud_access_key_id. Required. The ID for your Amazon Web Services or Google Cloud Storage authentication.
  • cloud_secret_access_key. Required. Your Amazon Web Services or Google Cloud Storage access key.
  • primary_key. Required. Specifies whether this key is primary. If you set this to true, the key's version_guid is passed to primary_guid.
network_configurationThe key's network deployment details. Contains:
  • additional_cdn. Specifies whether to deploy the key to additional CDN networks. Value is one of:
    • RUSSIA_CDN to enable consumption of content in Russia.
    • CHINA_CDN to enable consumption of content in China.
  • security_network. Required. The network's security level. Value is one of:
    • STANDARD_TLS for a non-PCI compliant network.
    • ENHANCED_TLS for a PCI compliant network.
timeoutsUses the create, update, and delete arguments to override the HashiCorp processing timeout. By default, it's 60 minutes with a one minute polling interval. Value is a string containing a number and its time reference, h, m, s. You can pass one, two, or all values. For example:
  • 1h3m5s
  • 2h5m
  • 3m

Attributes

There is no default standard output. Upon creation, the last line of the process log contains a success message.

Adding an output block returns the access key details you provided on create along with the computed attributes.

AttributeDescription
access_key_uidThe access key's ID.
access_key_nameA human-readable name for your access key.
authentication_methodThe type of authentication. Value is one of:
  • AWS4_HMAC_SHA256 for Amazon Web Services.
  • GOOG4_HMAC_SHA256 for Google Cloud Storage.
contract_idYour contract ID.
group_idYour group ID.
credentials_a/credentials_bYour cloud access credentials.
  • cloud_access_key_id. The ID for your Amazon Web Services or Google Cloud Storage authentication.
  • cloud_secret_access_key. Your Amazon Web Services or Google Cloud Storage access key.
  • primary_key. Specifies whether this key is primary.
  • version_guid. The access key's version ID other than your primary key.
  • version. The access key's version number.
network_configurationThe key's network deployment details. Contains:
  • additional_cdn. Specifies whether the key is deployed to additional CDN networks. Value is one of:
    • RUSSIA_CDN enables consumption of content in Russia.
    • CHINA_CDN enables consumption of content in China.
  • security_network. The network's security level. Value is one of:
    • STANDARD_TLS for a non-PCI compliant network.
    • ENHANCED_TLS for a PCI compliant network.
primary_guidThe access key's version ID for your primary_key.
timeoutsThe create, update, and delete arguments overriding the HashiCorp processing timeout.