Skip to content

aztfm/terraform-azurerm-dns-zone

Repository files navigation

Azure DNS Zone - Terraform Module

pre-commit Terraform Registry GitHub release (latest by date)

Open in GitHub Codespaces

Version compatibility

Module version Terraform version AzureRM version
>= 1.x.x >= 1.3.x >= 3.65.0

Parameters

The following parameters are supported:

Name Description Type Default Required
name The name of the DNS zone. string n/a yes
resource_group_name The name of the resource group in which to create the DNS zone. string n/a yes
tags A mapping of tags to assign to the resource. map(string) {} no
soa_record Enables you to manage DNS SOA Record within Azure DNS zone. object({}) null no
a_records Enables you to manage DNS A Records within Azure DNS zone. list(object({})) [] no
aaaa_records Enables you to manage DNS A Records within Azure DNS zone. list(object({})) [] no
cname_records Enables you to manage DNS CNAME Records within Azure DNS zone. list(object({})) [] no
mx_records Enables you to manage DNS MX Records within Azure DNS zone. list(object({})) [] no
ptr_records Enables you to manage DNS PTR Records within Azure DNS zone. list(object({})) [] no
srv_records Enables you to manage DNS SRV Records within Azure DNS zone. list(object({})) [] no
txt_records Enables you to manage DNS TXT Records within Azure DNS zone. list(object({})) [] no

The soa_record supports the following:

Name Description Type Default Required
email The email contact for the SOA record. string n/a yes
tags A mapping of tags to assign to the Record Set. map(string) null no
expire_time The expire time for the SOA record. number null no
minimum_ttl The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. number null no
refresh_time The refresh time for the SOA record. number null no
retry_time The retry time for the SOA record. number null no
ttl The Time To Live of the SOA Record in seconds. number null no

The a_records supports the following:

Name Description Type Default Required
name The name of the DNS A Record. string n/a yes
tags A mapping of tags to assign to the resource. map(string) null no
ttl The Time To Live (TTL) of the DNS record in seconds. number n/a yes
records List of IPv4 Addresses. list(string) n/a yes

The aaaa_records supports the following:

Name Description Type Default Required
name The name of the DNS AAAA Record. string n/a yes
tags A mapping of tags to assign to the resource. map(string) null no
ttl The Time To Live (TTL) of the DNS record in seconds. number n/a yes
records List of IPv6 Addresses. list(string) n/a yes

The cname_records supports the following:

Name Description Type Default Required
name The name of the DNS CNAME Record. string n/a yes
tags A mapping of tags to assign to the resource. map(string) null no
ttl The Time To Live (TTL) of the DNS record in seconds. number n/a yes
record The target of the CNAME. string n/a yes

The mx_records supports the following:

Name Description Type Default Required
name The name of the DNS MX Record. string n/a yes
tags A mapping of tags to assign to the resource. map(string) null no
ttl The Time To Live (TTL) of the DNS record in seconds. number n/a yes
records A list of values that make up the MX record. list(object({}) n/a yes

The mx_records.records supports the following:

Name Description Type Default Required
preference String representing the preference value of the MX records. Records with lower preference value take priority. number n/a yes
exchange The mail server responsible for the domain covered by the MX record. string n/a no

The ptr_records supports the following:

Name Description Type Default Required
name The name of the DNS PTR Record. string n/a yes
tags A mapping of tags to assign to the resource. map(string) null no
ttl The Time To Live (TTL) of the DNS record in seconds. number n/a yes
records List of Fully Qualified Domain Names. list(string) n/a yes

The srv_records supports the following:

Name Description Type Default Required
name The name of the DNS SRV Record. string n/a yes
tags A mapping of tags to assign to the resource. map(string) null no
ttl The Time To Live (TTL) of the DNS record in seconds. number n/a yes
records A list of values that make up the SRV record. list(object({}) n/a yes

The srv_records.records supports the following:

Name Description Type Default Required
priority Priority of the SRV record. number n/a yes
weight Weight of the SRV record. number n/a no
port Port the service is listening on. number n/a yes
target FQDN of the service. string n/a yes

The txt_records supports the following:

Name Description Type Default Required
name The name of the DNS TXT Record. string n/a yes
tags A mapping of tags to assign to the resource. map(string) null no
ttl The Time To Live (TTL) of the DNS record in seconds. number n/a yes
records A list of values that make up the txt record. list(string) n/a yes

Outputs

The following outputs are exported:

Name Description Sensitive
id The DNS Zone ID. no
name The name of the DNS zone. no
resource_group_name The name of the resource group in which to create the DNS zone. no
tags The tags assigned to the resource. no
number_of_record_sets The current number of record sets in this DNS zone. no
max_number_of_record_sets The maximum number of record sets that can be created in this DNS zone. no
soa_record Block containing configuration of SOA record. no
a_records Blocks containing configuration of each A record. no
aaaa_records Blocks containing configuration of each AAAA record. no
cname_records Blocks containing configuration of each CNAME record. no
mx_records Blocks containing configuration of each MX record. no
ptr_records Blocks containing configuration of each PTR record. no
srv_records Blocks containing configuration of each SRV record. no
txt_records Blocks containing configuration of each TXT record. no