Idempotency issue with secure_environment_variables inside init_container in azurerm_container_group #22823
Closed
1 task done
Labels
Milestone
Is there an existing issue for this?
Community Note
Terraform Version
1.4.6
AzureRM Provider Version
3.67.0
Affected Resource(s)/Data Source(s)
azurerm_container_group
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
If the secure environment variable data is the same, it should not replace this resource.
Actual Behaviour
The resource is replaced.
Steps to Reproduce
Important Factoids
No response
References
I followed the chain down through the resource code. In the function
flattenContainerEnvironmentVariables
on line 1770, the key parameter provided tod.Get
assumes the data item to becontainer.%d.secure_environment_variables.%s
.When flattenContainerEnvironmentVariables is called from the function
flattenContainerGroupInitContainers
, the d.Get should be looking for keys starting withinit_container.%d.secure_environment_variables.%s
.Note also that secure_environment_variables are not tested in init_containers in the tests at:
terraform-provider-azurerm/internal/services/containers/container_group_resource_test.go
Line 2134 in 10ecd75
The text was updated successfully, but these errors were encountered: