Edge DNS resources
Azion Terraform Provider resources and data sources that manage Edge DNS zones, records, and DNSSEC with the azion_intelligent_dns family.
The Azion Terraform Provider manages Edge DNS with three resources and reads it with four data sources. A zone holds the records of a domain, and DNSSEC adds a layer of security to a zone. The identifiers keep the intelligent_dns form that the provider uses, and they have the same names in provider v1.x and v2.0. For more information, refer to Migrate from provider v1.x to v2.0.
Edge DNS resources
| Resource | Description |
|---|---|
azion_intelligent_dns_zone | Creates and manages a DNS zone. |
azion_intelligent_dns_record | Creates and manages a DNS record. |
azion_intelligent_dns_dnssec | Manages the DNSSEC settings of a zone. |
Each resource takes its settings in one nested block: zone, record, or dnssec. The record and DNSSEC resources also take zone_id outside the block, and they read it from the id attribute of the zone resource.
| Resource | Argument | Type | Required | Description |
|---|---|---|---|---|
azion_intelligent_dns_zone | zone.name | String | Yes | The name that identifies the zone in lists. It is not the domain. |
azion_intelligent_dns_zone | zone.domain | String | Yes | The domain that the zone serves, such as example.com. |
azion_intelligent_dns_zone | zone.active | Boolean | Yes | Sets whether the zone answers queries for its domain. |
azion_intelligent_dns_record | zone_id | String | Yes | The ID of the zone that holds the record. |
azion_intelligent_dns_record | record.name | String | Yes | The name of the record, relative to the zone, such as www. |
azion_intelligent_dns_record | record.type | String | Yes | The record type, such as A, AAAA, or CNAME. |
azion_intelligent_dns_record | record.rdata | List of strings | Yes | One or more answers of the record. |
azion_intelligent_dns_record | record.policy | String | Yes | simple answers with every value of the record. weighted lets several records share a name and type. |
azion_intelligent_dns_record | record.ttl | Number | Yes | The time to live of the record, in seconds. |
azion_intelligent_dns_record | record.weight | Number | No | The weight of the record. It applies only when policy is weighted. |
azion_intelligent_dns_record | record.description | String | No | The description of the record, for either policy. |
azion_intelligent_dns_dnssec | zone_id | String | Yes | The ID of the zone. |
azion_intelligent_dns_dnssec | dnssec.is_enabled | Boolean | Yes | Sets whether DNSSEC is on for the zone. |
A simple record takes description from provider 2.10.0. Versions 2.0.0 to 2.9.0 send description only for weighted records, so a simple record with a description fails on terraform apply. The provider stores an empty description as unset.
For every record type, refer to Record types. For the limits of each field, refer to Zones and records. The Terraform Registry page of each resource lists every argument.
Data sources
| Data source | Description |
|---|---|
azion_intelligent_dns_zones | Lists DNS zones. |
azion_intelligent_dns_zone | Reads one DNS zone. |
azion_intelligent_dns_records | Lists DNS records. |
azion_intelligent_dns_dnssec | Reads the DNSSEC settings of a zone. |
Example
This configuration pins provider 2.10.0 and creates a zone with an A record and a CNAME record. It turns on DNSSEC for the zone and outputs the zone ID. The A record carries a description, which a simple record takes from provider 2.10.0. The configuration reads your personal token from the api_token variable that the Azion Terraform Provider quickstart declares.