GuideReference
TrainingSupportCommunity
Guide

DNS zone

akamai_dns_zone

 Average processing time 1-2 minutes

Create and update a DNS zone to configure its integration with your existing DNS infrastructure.

Example

resource "akamai_dns_zone" "my_dns_zone" {
  contract = "C-0N7RAC7"
  zone     = "my_dns_zone.com"
  type     = "secondary"
  masters = [
    "1.2.3.4",
    "1.2.3.5",
  ]
  comment        = "This is my dns zone"
  group          = 123456
  sign_and_serve = false
}
//create
akamai_dns_zone.my_dns_zone: Creation complete after 3s [id=12a3bcd4-abcd-a1b2345678de#my_dns_zone.com#my_dns_zone.com]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

//update
akamai_dns_zone.my_dns_zone: Modifications complete after 2s [id=12345678-1234-12ab-a1bcd23e4f567#my_dns_zone.com#my_dns_zone.com]

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

Arguments

ArgumentRequiredDescription
contract✔️Your contract ID.
zone✔️The domain zone, encapsulating any nested subdomains.
type✔️The zone type. It can be: primary, secondary, or alias.
  • A primary zone's records are stored in the Akamai Portal.
  • A secondary zone's records are stored on the customer's name servers.
  • An alias zone enables you to duplicate the configuration of an existing zone.
mastersThe IP addresses of the customer's name servers from which the zone data should be retrieved (required only for secondary zones).
commentA descriptive comment. You can add it when you review the change list to activate zone updates.
If you don't provide any comments, it's filled out with a default value: Managed by Terraform.
groupThe currently selected group ID.
sign_and_serveIt indicates whether DNSSEC Sign and Serve is enabled (required only for primary and secondary zones).
sign_and_serve_algorithmThe algorithm currently or last used by DNSSEC Sign and Serve.
end_customer_idA free-form identifier for the zone.
targetThe name of the zone whose configuration this zone will copy (required only for alias zones).
tsig_keyThe TSIG Key used in secure zone transfers (required only for secondary zones). If used, it requires the following arguments:
  • name. The key name.
  • algorithm. The hashing algorithm.
  • secret. A string known between transfer endpoints.

🚧

The provider zone resource import doesn't have access to the resource configuration during import processing. As such, the contract argument will be populated in the Terraform zone resource state after the import but the group attribute won't. Executing the terraform apply command will reconcile the configuration and the Terraform zone resource state.