Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data "azurerm_private_dns_zone" no longer looks up resource group starting in v3.8.0 #17036

Closed
1 task done
jdaugherty opened this issue May 31, 2022 · 3 comments · Fixed by #17729
Closed
1 task done

Comments

@jdaugherty
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.2.0

AzureRM Provider Version

3.8.0

Affected Resource(s)/Data Source(s)

data azurerm_private_dns_zone

Terraform Configuration Files

terraform {
  required_providers {
    azurerm = {
      source                = "hashicorp/azurerm"
      version               = "=3.8.0"
      configuration_aliases = [azurerm, azurerm.ops]
    }
  }
}

data "azurerm_private_dns_zone" "aks-dns-zone-lookup" {
  name                = "privatelink.eastus.azmk8s.io"
  provider            = azurerm.ops
}

output "testing" {
  value = data.azurerm_private_dns_zone.aks-dns-zone-lookup.id
}

Debug Output/Panic Output

testing = "/subscriptions/***/resourceGroups//providers/Microsoft.Network/privateDnsZones/privatelink.eastus.azmk8s.io"

Expected Behaviour

testing = "/subscriptions/***/resourceGroups/my-resource-group-name-here/providers/Microsoft.Network/privateDnsZones/privatelink.eastus.azmk8s.io"

In v3.7.0, the resource group name was optional on the data lookup, but in v3.8.0 it returns an id without the resource group name in the path if a resource group name is not provided. Adding the resource group name to the data lookup includes the resource name, indicating that it's now required in 3.8.0 or a regression was introduced in 3.8.0.

Actual Behaviour

testing = "/subscriptions/***/resourceGroups//providers/Microsoft.Network/privateDnsZones/privatelink.eastus.azmk8s.io"

The resource group name is excluded in 3.8.0, while it was previously included in 3.7.0

Steps to Reproduce

terraform apply

Important Factoids

No response

References

No response

@jdaugherty jdaugherty added the bug label May 31, 2022
@jdaugherty jdaugherty changed the title data "azurerm_private_dns_zone" no longer looks up resource group starting in v3.8.0d data "azurerm_private_dns_zone" no longer looks up resource group starting in v3.8.0 May 31, 2022
@github-actions github-actions bot removed the bug label May 31, 2022
@tombuildsstuff tombuildsstuff modified the milestones: v3.9.0, v3.10.0 May 31, 2022
@tombuildsstuff tombuildsstuff modified the milestones: v3.10.0, v3.11.0 Jun 10, 2022
@jackofallops jackofallops modified the milestones: v3.11.0, v3.12.0 Jun 23, 2022
@tombuildsstuff tombuildsstuff modified the milestones: v3.12.0, v3.13.0 Jul 1, 2022
@manicminer manicminer modified the milestones: v3.13.0, v3.14.0 Jul 8, 2022
@tombuildsstuff tombuildsstuff modified the milestones: v3.14.0, v3.15.0 Jul 15, 2022
@owenfarrell
Copy link
Contributor

@jdaugherty - looks like this was a byproduct of #16858. In prior versions, the resource ID was lazily generated (off of the Azure API response). But after the move to the embedded SDK, the ID was eagerly generated.

And while the resource group name attribute in the state was always being populated, the resource group name attribute on that ID wasn't updated if/when omitted in the configuration.

@github-actions
Copy link

github-actions bot commented Aug 5, 2022

This functionality has been released in v3.17.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
Copy link

github-actions bot commented Sep 5, 2022

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants