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

Bug Report: Private DNS zone link in setting.connectivity.tf #204

Closed
tisigoncalve opened this issue Nov 12, 2021 · 1 comment · Fixed by #217
Closed

Bug Report: Private DNS zone link in setting.connectivity.tf #204

tisigoncalve opened this issue Nov 12, 2021 · 1 comment · Fixed by #217
Assignees

Comments

@tisigoncalve
Copy link

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

Versions

terraform: 1.0.10

azure provider: 2.82.0

module: 1.0

Description

In setting.connectivity.tf file the Private DNS zone are linked to the VNET's even when the bellow boolean's were false. this happens for the hub vnet and for the spoke vnet

      enable_private_dns_zone_virtual_network_link_on_hubs   = false
      enable_private_dns_zone_virtual_network_link_on_spokes = false

Steps to Reproduce

  1. Create hub vnet and attach the spoke vnet (spoke_virtual_network_resource_ids) in the setting.connectivity.tf

  2. put the following values to false:
    enable_private_dns_zone_virtual_network_link_on_hubs = false
    enable_private_dns_zone_virtual_network_link_on_spokes = false

  3. in the TF plan the link between VNET and private DNS zone is created.

@krowlandson krowlandson self-assigned this Nov 12, 2021
krowlandson pushed a commit to krowlandson/terraform-azurerm-caf-enterprise-scale that referenced this issue Nov 24, 2021
@krowlandson
Copy link
Contributor

Looks like the root cause of this was down to selecting the wrong scope when determining whether these resources should be managed_by_module.

We were pulling the managed_by_module value from the underlying azurerm_private_dns_zone configuration and not considering the individual azurerm_private_dns_zone_virtual_network_link configuration.

Have updated the code to consider both as part of determining whether to create the azurerm_private_dns_zone_virtual_network_link resource or not.

krowlandson pushed a commit to krowlandson/terraform-azurerm-caf-enterprise-scale that referenced this issue Nov 24, 2021
@krowlandson krowlandson added this to the v1.0.1 release milestone Nov 24, 2021
krowlandson pushed a commit that referenced this issue Nov 25, 2021
* Fix #216

* Change scope of managed_by_module to fix #204

* Consider both scopes to fix #204

Co-authored-by: Matt White <matt.white@microsoft.com>
@ghost ghost locked as resolved and limited conversation to collaborators Dec 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants