Support Alias records in Azure DNS for public zones. This feature allows referencing other Azure resources from within their DNS zones such that the DNS records get updated automatically when there is a lifecycle event on the referenced Azure resources.
Sample ARM template block:
{
"type": "Microsoft.Network/dnszones/A",
"apiVersion": "2018-05-01",
"name": "[concat(parameters('dnszones_bla.foo_name'), '/@')]",
"dependsOn": [
"[resourceId('Microsoft.Network/dnszones', parameters('dnszones_bla.foo_name'))]"
],
"properties": {
"TTL": 3600,
"targetResource": {
"id": "[concat(parameters('profiles_cdnprofileabc_externalid'), '/endpoints/blafoobar')]"
}
}
},
resource "azurerm_dns_a_record" "test" {
name = "test"
zone_name = "${azurerm_dns_zone.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
ttl = 300
targetResource = "${azurerm_cdn_endpoint.test.name}"
}
FYI, this will require an update of the SDK version
I'm also affected by this. My use case requires the '@' record creating to enable aliasing at the zone level. Something like this:
resource "azurerm_dns_a_record" "test" {
name = "@"
zone_name = "${azurerm_dns_zone.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
ttl = 300
target_resource_id = "${azurerm_cdn_endpoint.test.id}"
}
I have started taking a look at this: matt-FFFFFF/terraform-provider-azurerm#2
Initial testing with A records has been successful.
This has been released in version 1.40.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:
provider "azurerm" {
version = "~> 1.40.0"
}
# ... other configuration ...
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
I'm also affected by this. My use case requires the '@' record creating to enable aliasing at the zone level. Something like this: