-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_postgresql_flexible_server isn't destroyed properly #23150
Comments
Thanks for raising this issue. Seems azurerm_private_dns_zone_virtual_network_link missed the dependency declaration of azurerm_subnet. Below is an example and it works fine on my local.
|
Hello @neil-yechenwei What version of Azurerm provider do you use? I still do not believe that it can be an issue, because Private DNS zone is not linked to subnet anyhow, it is linked to azure VNET. It is why it is not related to issue during destruction of subnet. We even can use a workaround to fix this issue on our side, for example by adding additional resource that will make a delay between PSQL destruction and destruction of subnet. But it will be a workaround, not a fix of initial bug in AzureRM provider |
Hello @rcskosir ! Thank you! |
Terraform version 1.9 and azurerm version 3.109.0 issue is still present. |
Same here, in our case we have a module for the postgres server and the subnet but the vnet, dns zone and link are created outside the module, so setting that kind of dependency makes no sense. This worked fine before, we got this issue after updating azurerm from v3.69.0 to v3.109.0 |
Is there an existing issue for this?
Community Note
Terraform Version
1.5.6
AzureRM Provider Version
3.71.0
Affected Resource(s)/Data Source(s)
azurerm_postgresql_flexible_server
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Terraform should destroy subnet only when deletion of Postgres Flexible server is completed
Actual Behaviour
This error appeared when we decided to update AzureRM version from 3.69.0 -> 3.71.0
In AzureRM v3.69.0 destruction of PSQL Flex takes around 2 mins 30 secs, after that terraform starts deleting virtual network subnet of PSQL
In AzureRM v3.71.0 destruction takes only 10-14 secs and Terraform starts deleting subnet and of course it can't be deleted because PSQL Flex server is still there and uses the subnet. (when terraform says that PSQL is deleted, I can see it for the next 2-3 mins in Azure Portal and PSQL state is "Updating"). It means that azurerm provider decides that resources is deleted even if it is not.
I have a feeling that this issue appeared after one of the following changes in provider:
v0.20230815.1165905
ofgit.luolix.top/hashicorp/go-azure-sdk
#22981)v0.20230810.1125717
ofgit.luolix.top/hashicorp/go-azure-sdk
#22874)Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: