-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-creation of azurerm_mssql_database fails with 404 #9101
Comments
I'm having the same issue. The error shows up when the resource needs to be recreated due to a change that can't be done in-place. In my case, I'm seeing the same problem with PostgreSQL:
Although the error, the resource is still created, but all the resources depending on it aren't (like for example a private endpoint in my case). After |
Any updates on this? We do have the same error with Terraform 1.7.4, azurerm 3.92.0. |
I am seeing this issue 3.83.0 and 3.96.0 of the provider so it is far from a legacy issue. We do not use taint to recreate as it is deprecated, instead we use the Terraform CLI with the -replace argument. The database does indeed get deleted but terraform seems to time out waiting for the resource to recreate and reports a 404 error within the next 2 minutes of waiting for the resource to be created. The database successfully creates after another 30 seconds of waiting. So the command that we use works for all the other resources we have tested but not the database. It looks like this: The most relevant part of the error message is this: It is worth noting that the resource supports custom timeouts which are not honoured and the default timeouts are very high already. |
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_mssql_server
Terraform Configuration Files
Debug Output
https://gist.github.com/lhaatveit/3bac422cdd7e311d006281c5b1454714
Expected Behavior
The database should successfully be destroy and re-created.
Actual Behavior
The database is destroyed and recreated, but Terraform fails with the following error:
Steps to Reproduce
terraform apply
terraform taint azurerm_mssql_database.test
terraform apply
Important Factoids
The same issue also appears intermittently when using a database with a dedicated SKU, but it appears consistently when the database belongs to an elastic pool.
The text was updated successfully, but these errors were encountered: