Open nmcbdev opened 1 month ago
@nmcbdev sometime ago this resource was migrated to the go-azure-sdk
maybe that introduced this behavior.
I will try to take a look. Hopefully it is something simple :)
Hi @Chambras Have you got any updates on this?
Is there an existing issue for this?
Community Note
Terraform Version
1.9.4
AzureRM Provider Version
3.115.0
Affected Resource(s)/Data Source(s)
azurerm_app_service_environment_v3
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The idempotency check should pass successfully and the "allow_new_private_endpoint_connections" setting should remain as True in the "azurerm_app_service_environment_v3" resource, as per Terraform documentation the setting should Default to True, even if not specified.
Actual Behaviour
Idempotency check fails as the setting has been somehow set to False during/after Terraform Apply:
Terraform will perform the following actions:
Idempotency check fails even if the setting is explicitly defined as True in the Terraform configuration.
We have previously looked into this with Azure support team to see if this is some sort of bug on their side, but confirmed that's not the case. From our findings, it seems like the ARM payload coming from Terraform to Azure during apply doesn't contain any value for the allow_new_private_endpoint_connections setting, which suggests it's not actually always set to True as per Terraform documentation. In turn, Azure then sets it to their Default which is False, since Terraform hasn't provided any value. However, I still do not understand why would it still fail even if we DO specify the setting in our Terraform configuration.
We started seeing this issue a couple of months ago and haven't found any code changes/policies/other settings that could've started affecting this setting from our side.
Steps to Reproduce
Important Factoids
No response
References
Reference to ASE resource documentation, which states that the setting's Default is True.
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/app_service_environment_v3#:~:text=allow_new_private_endpoint_connections%20%2D%20(Optional)%20Should%20new%20Private%20Endpoint%20Connections%20be%20allowed.%20Defaults%20to%20true.