Closed jaredfholgate closed 1 week ago
Thanks @jaredfholgate, is this not needed due to this line
In general data sources are a bad idea. Instead accept a resource id for an existing RG (string, default null), or create one.
I am also going to remove this from alz mgmt
Ah, as you are using azurerm the client config data source is the best approach as you've done in #40
Check for previous/existing GitHub issues
Issue Type?
I'm not sure
(Optional) Module Version
latest
(Optional) Correlation Id
No response
Description
Remove the data source for the resource group: https://github.com/Azure/terraform-azurerm-avm-ptn-network-private-link-private-dns-zones/blob/3acbfd844ec3e3e735da9bb15d8ec3f25b1c9192/main.tf#L9
I have seen an edge case where the data source is read even though it is dependent on an input that is unknown causing an error as the resource group does not exist yet.
I appreciate this is down to the consumer, but the data source can be removed without impacting the module and would remove the need to add explicit dependencies in this scenario.
Example: