Closed cfBrianMiller closed 4 months ago
I concur, if the resource group is created in the same apply then the data source fails - recommend removing the data source and making the location input mandatory
I'm also seeing this behavior when deploying the resource group when using the avm storage account module. Work-around is to create the resource group outside of the terraform apply and import it, which is not ideal, but a minor annoyance. I haven't experienced this with any other avms.
Agreed, my workaround is adding a "depends_on" block for the module containing the resource group but obviously that's less than ideal. Agree with your approach @matt-FFFFFF.
Hi @chinthakaru any update here?
this has been fixed in #70, released in v0.1.2
the variable description for the location should be updated to removed the reference to it using the data source, and the commented out data source in main.tf should be removed.
This has been fixed in #70.
Is there an existing issue for this?
Greenfield/Brownfield provisioning
greenfield
Terraform Version
1.7.5
Module Version
0.1.1
AzureRM Provider Version
3.98.0
Affected Resource(s)/Data Source(s)
azurerm_resource_group
Terraform Configuration Files
tfvars variables values
Debug Output/Panic Output
Expected Behaviour
Module deploys successfully
Actual Behaviour
Resource Group data module can't find resource group created in previous call
Steps to Reproduce
terraform plan
Important Factoids
No response
References
This appears to be related to: https://github.com/hashicorp/terraform-provider-azurerm/issues/5233
No response