Azure DNS Aaaa Record
This page shows how to write Terraform and Azure Resource Manager for DNS Aaaa Record and write them securely.
azurerm_dns_aaaa_record (Terraform)
The Aaaa Record in DNS can be configured in Terraform with the resource name azurerm_dns_aaaa_record
. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_dns_aaaa_record" "custom01" {
name = "custom01"
zone_name = azurerm_dns_zone.jitsi_rocks_dns.name
resource_group_name = azurerm_resource_group.openinfrastructure_rg.name
ttl = 3600
records = ["2a01:4f8:c17:4db1::1"]
resource "azurerm_dns_aaaa_record" "over1B" {
name = "test"
zone_name = azurerm_dns_zone.example.name
resource_group_name = azurerm_resource_group.example.name
ttl = 300
records = ["2001:db8::1:0:0:1"]
resource "azurerm_dns_aaaa_record" "aaaa" {
for_each = {
for key, value in try(var.records.aaaa, {}) : key => value
if try(value.resource_id, null) == null
}
resource "azurerm_dns_aaaa_record" "aaaa" {
for_each = {
for key, value in try(var.records.aaaa, {}) : key => value
if try(value.resource_id, null) == null
}
resource "azurerm_dns_aaaa_record" "aaaa" {
for_each = {
for key, value in try(var.records.aaaa, {}) : key => value
if try(value.resource_id, null) == null
}
resource "azurerm_dns_aaaa_record" "default_www_openinfra" {
name = "@"
zone_name = azurerm_dns_zone.openinfrastructure_dns.name
resource_group_name = azurerm_resource_group.openinfrastructure_rg.name
ttl = 3600
records = ["2a01:4f9:c010:2dba::1"]
resource "azurerm_dns_aaaa_record" "aaaa" {
for_each = {
for key, value in try(var.records.aaaa, {}) : key => value
if try(value.resource_id, null) == null
}
resource "azurerm_dns_aaaa_record" "git_openinfra" {
name = "git"
zone_name = azurerm_dns_zone.openinfrastructure_dns.name
resource_group_name = azurerm_resource_group.openinfrastructure_rg.name
ttl = 3600
records = ["2a01:4f8:c17:b9f1::1"]
resource "azurerm_dns_aaaa_record" "aaaa_record_public_with_zone" {
count = var.create_dns_zone ? (var.public_dns_zone ? length(var.aaaa_records) : 0) : 0
zone_name = var.zone_name
resource_group_name = var.resource_group_name
resource "azurerm_dns_aaaa_record" "over1B" {
name = "test"
zone_name = azurerm_dns_zone.example.name
resource_group_name = azurerm_resource_group.example.name
ttl = 300
records = ["2001:db8::1:0:0:1"]
Parameters
-
fqdn
optional computed - string -
id
optional computed - string -
name
required - string -
records
optional - set of string -
resource_group_name
required - string -
tags
optional - map from string to string -
target_resource_id
optional - string -
ttl
required - number -
zone_name
required - string -
timeouts
single block
Explanation in Terraform Registry
Enables you to manage DNS AAAA Records within Azure DNS.
Microsoft.Network/dnszones/AAAA (Azure Resource Manager)
The dnszones/AAAA in Microsoft.Network can be configured in Azure Resource Manager with the resource name Microsoft.Network/dnszones/AAAA
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"zone": {
"type": "Microsoft.Network/dnszones/AAAA",
"name": "[concat(parameters('DNSObj').dnsZoneName, '/', parameters('DNSObj').AAAARecords[copyIndex()].name)]",
"apiVersion": "2018-05-01",
"copy": {
"name": "obj",
"count": "[length(parameters('DNSObj').AAAARecords)]"
"type": "Microsoft.Network/dnszones/AAAA",
"name": "[concat(parameters('DNSObj').dnsZoneName, '/', parameters('DNSObj').AAAARecords[copyIndex()].name)]",
"apiVersion": "2018-05-01",
"copy": {
"name": "obj",
"count": "[length(parameters('DNSObj').AAAARecords)]"
"type": "Microsoft.Network/dnszones/AAAA",
"name": "[concat(parameters('DNSObj').dnsZoneName, '/', parameters('DNSObj').AAAARecords[copyIndex()].name)]",
"apiVersion": "2018-05-01",
"copy": {
"name": "obj",
"count": "[length(parameters('DNSObj').AAAARecords)]"
"type": "Microsoft.Network/dnszones/AAAA",
"name": "[concat(parameters('DNSObj').dnsZoneName, '/', parameters('DNSObj').AAAARecords[copyIndex()].name)]",
"apiVersion": "2018-05-01",
"copy": {
"name": "obj",
"count": "[length(parameters('DNSObj').AAAARecords)]"
Frequently asked questions
What is Azure DNS Aaaa Record?
Azure DNS Aaaa Record is a resource for DNS of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure DNS Aaaa Record?
For Terraform, the open-infrastructure/infrastructure-as-code, gilyas/infracost and anmoltoppo/Terraform source code examples are useful. See the Terraform Example section for further details.
For Azure Resource Manager, the martgras/armdemo, canada-ca/accelerators_accelerateurs-azure and canada-ca/accelerators_accelerateurs-azure source code examples are useful. See the Azure Resource Manager Example section for further details.