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.
Terraform doesn't have access to the zone resource configuration when processing the import. As such, Terraform will populate the contract
attribute for that resource in your state after import, but it won’t populate the group
attribute. Update the group
locally and then run terraform apply
to reconcile your configuration and state.
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 = "My dns zone"
group = 12345
sign_and_serve = false
tsig_key {
name = "my-example.com"
algorithm = "hmac-sha1"
secret = "aB1Cd23E4FGhij5klmnOPqRSTvw5y7xyZabCdeFgH8i90JKlMN1OpqrSTu2V3Wx+4y56ZAbcDefgh789iJkLm=="
}
}
Arguments
Argument | Required | Description |
---|---|---|
contract |
✔ | Your contract ID. |
zone |
✔ | The domain zone, encapsulating any nested subdomains. |
type |
✔ |
The zone type. It can be: primary , secondary , or alias .
|
masters |
Required only for secondary zones. The IP addresses of the customer's name servers from which the zone data should be retrieved. |
|
comment |
A 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 . |
|
group |
The currently selected group ID. | |
sign_and_serve |
Required only for primary and secondary zones. Indicates whether DNSSEC Sign and Serve is enabled. true to enable. |
|
sign_and_serve_algorithm |
The algorithm currently or last used by DNSSEC Sign and Serve. Possible values:
|
|
end_customer_id |
A free-form identifier for the zone. | |
target |
Required only for alias zones. The name of the zone whose configuration this zone will copy. |
|
tsig_key |
Required only for secondary zones. The TSIG Key used in secure zone transfers. If used, it requires these arguments:
|
Attributes
There is no default standard output. Upon creation, the last line of the process log contains a success message with the resource id.
Adding an output block returns the zone details you provided on create along with the computed attributes.
Attribute | Description |
---|---|
version_id | The ID of the most recently activated zone version. |
alias_count | The number of zones of the alias type that point to this zone. Computed only for primary and secondary zones. |
activation_state | The zone's activation status. |
Updated 23 days ago