-
Notifications
You must be signed in to change notification settings - Fork 39
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
Turn off Private DNS zones and Private DNS resolver Fails #289
Comments
5 tasks
Thanks for reporting. Will be fixed in this PR shortly: Azure/alz-terraform-accelerator#209 |
jaredfholgate
added a commit
to Azure/alz-terraform-accelerator
that referenced
this issue
Jan 30, 2025
<!-- Thank you for submitting a Pull Request. Please fill out the template below.--> ## Overview/Summary Fixes a bug when removing the private DNS block from config ## This PR fixes/adds/changes/removes 1. Azure/ALZ-PowerShell-Module#289 ### Breaking Changes None ## Testing Evidence Please provide any testing evidence to show that your Pull Request works/fixes as described and planned (include screenshots, if appropriate). ## As part of this Pull Request I have - [x] Checked for duplicate [Pull Requests](https://github.com/Azure/alz-terraform-accelerator/pulls) - [x] Associated it with relevant [issues](https://github.com/Azure/alz-terraform-accelerator/issues), for tracking and closure. - [x] Ensured my code/branch is up-to-date with the latest changes in the `main` [branch](https://github.com/Azure/alz-terraform-accelerator/tree/main) - [x] Performed testing and provided evidence. - [x] Updated relevant and associated documentation.
Released in v4.6.2 of the starter module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I Tried to turn off Private DNS as described https://azure.github.io/Azure-Landing-Zones/accelerator/startermodules/terraform-platform-landing-zone/options/dns/
the integration pipeline failed with error
│ Error: Attempt to get attribute from null value
│
│ on modules/hub-and-spoke-vnet/locals.dns.tf line 13, in locals:
│ 13: }, value.private_dns_zones) if local.private_dns_zones_enabled[key] && value.private_dns_zones.auto_registration_zone_enabled }
│ ├────────────────
│ │ value.private_dns_zones is null
│
│ This value is null, so it does not have any attributes.
as workaround i changed the block private_dns_zones_auto_registration in modules/hub-and-spoke-vnet/locals.dns.tf to
private_dns_zones_auto_registration = { for key, value in var.hub_virtual_networks : key =>
merge({
location = value.hub_virtual_network.location
vnet_resource_id = module.hub_and_spoke_vnet.virtual_networks[key].id
},
value.private_dns_zones != null ? value.private_dns_zones : {}) if local.private_dns_zones_enabled[key] && value.private_dns_zones != null && try(value.private_dns_zones.auto_registration_zone_enabled, false)
}
The text was updated successfully, but these errors were encountered: