hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.59k stars 4.63k forks source link

azurerm_private_dns_a_record apex records validation bug: Error: "name" cannot contain @ #13081

Closed t-l-k closed 3 years ago

t-l-k commented 3 years ago

Community Note

Terraform (and AzureRM Provider) Version

terraform v1.0.3 azurerm 2.73.0

Affected Resource(s)

azurerm_private_dns_a_record

Terraform Configuration Files

resource "azurerm_private_dns_a_record" "apex" {
  name                = "@"
  zone_name           = azurerm_private_dns_zone.apps.name
  resource_group_name = azurerm_private_dns_zone.apps.resource_group_name
  ttl                 = 300
  records             = [local.ingress.load_balancer_ip]
}

Expected Behaviour

I expect it to manage an apex record in Azure DNS, which is typically denoted with the name @. I expect it to plan and apply apex records, which it was doing in v2.72.0.

Actual Behaviour

It failed to plan:

╷
│ Error: "name" cannot contain @
│ 
│   with azurerm_private_dns_a_record.apex,
│   on dns-https.tf line 34, in resource "azurerm_private_dns_a_record" "apex":
│   34:   name                = "@"
│ 
╵

I've reverted back to v2.72.0 in my required providers and it is working fine:

    azurerm = {
      version = "= 2.72.0"
    }

Important Factoids

Here is documentation of using Powershell cmdlet New-AzPrivateDnsRecordSet for managing an apex record, which suggests that it should be supported. Also example for public DNS "Onboard a root or apex domain" in the CDN documentation - although not related to private DNS, I've read for the most part it is meant to have feature parity.

t-l-k commented 3 years ago

PR which introduced the issue, which is has a bit of a weird name:

github-actions[bot] commented 3 years ago

This functionality has been released in v2.74.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

github-actions[bot] commented 3 years ago

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.