Open 0xtvignoli opened 3 weeks ago
Setting the expectation: This module is not compatible with enterprise level Landing Zone. This was never the goal.
The proposed solution does not work because it seems to me the Terraform provider accepts only the values System
or None
From the AKS documentation it seems that in Azure CLI --private-dns-zone
parameter can actually accept a resourceID value in addition to System
and None
But looking at azure-rest-api-specs again I see in the description only System
or None
@ms-henglu can you please have a look to check if we are eventually missing a feature in the provider code ? thanks
I actually read the code again:
I missed privatezones.ValidatePrivateDnsZoneID
:
@0xtvignoli making private_dns_zone_id
configurable to a PrivateDnsZoneID would fix your problem ? I want to avoid the possibility of setting it to None
Thank you for the quick response. I believe the proposed solution does not align with the current as-is infrastructure, as private DNS zones can only be managed within the Landing Zone (LZ) framework, rather than directly at the subscription level.
I need more eyes on this issue because I am not sure what is the right thing to do:
@matt-FFFFFF @lonegunmanb @nellyk @ibersanoms @mosabami I don't know how to build a test scenario for this.
If I create a variable for private_dns_zone_id
letting the user specify a DNS zone ID that lives in a different subscription, how can I test this scenario with the AVM CI ?
Do we have other AVM modules that need to support DNS zones in a different subscription ? Do we have any other AVM module supporting Landing Zones scenarios ?
thanks
Hi,
You can use an example. Deploy the dns zone in the example root. Then pass in the resource id into the module
@matt-FFFFFF But how can I create the DNS zone in a different subscription than the one where I deploy the module ?
You can't but that won't matter for the purposes of the example. It will demonstrate that the module can take in a dependency.
@0xtvignoli PR #139 should solve the problem of setting private_dns_zone_id
and should get you unblocked with the Landing Zone. Please let me know if the PR looks good to you. thanks
Thanks @zioproto for you effort! 👍
Check for previous/existing GitHub issues
Issue Type?
Feature Request
(Optional) Module Version
0.2.0
(Optional) Correlation Id
No response
Description
When applying the
terraform-azurerm-avm-ptn-aks-production
module at version0.2.0
, Terraform attempts to provision a new AKS cluster. This includes various resource definitions withinazurerm_kubernetes_cluster.this
triggering a provisioning process with the following parameters:Issue Encountered
The module fails due to an enterprise-level Landing Zone (LZ) policy restriction on
private_dns_zone_id
creation withinazurerm_kubernetes_cluster.this
. Specifically, the policy prohibits the creation of private DNS zones, returning the following error upon apply:The policy originates from enterprise-level management configurations, specifically aimed at restricting private DNS resource creation across the subscription's management group.
To summarize:
Proposed Solution
Add configuration options to:
private_dns_zone_id
as an input variableEnvironment Details