-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
google_service_networking_connection
produce an error when trying to destroy the resource
#19908
Comments
I have the same problem when try to use Terraform to establish a private connection from the SQL instance to a VPC (https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/sql_database_instance) |
Hi @botzkobg! I ran your code and I was able to successfully destroy the |
Thank you @ggtisc I will try again by using the command you have used. Could you confirm if you checked the UI and if you did where both resources created as on my screenshots? |
@ggtisc, just tried as you suggested without any vars and with the command that will delete only this resource. I got the same error message. Here is the output of the commands: I also tried on a new project. On this new project there is no problem to destroy the resource. All resources in my project are created with terraform and nothing else was used to create or change resource (except me deleting @wawrzek I also use this for mysql instance. |
yes @botzkobg I took the time to confirm that nothing would be left on the UI side. It should be noted that I used a project where I had no other resources other than those involved in this scenario |
@ggtisc I have managed to reproduce it on a new project. It seems that the issue will happen if you additionally create a mysql database. After a database was created once you will be able to reproduce this issue every time on that project. Steps to reproduce:
Execute the following commands:
This will give you the reported error message:
|
You can use the test from this module (called postgres) to reproduce the issue. Link to the repo with a module and the test: https://github.com/ivy-net/otofu-modules/tree/master/postgres
|
Confirmed issue! After creating the resources and then trying to destroy the |
This may be similar to #18834 |
Community Note
Terraform Version & Provider Version(s)
Terraform v1.9.8
on macOS Sonoma 14.6.1
Affected Resource(s)
google_service_networking_connection
Terraform Configuration
Debug Output
N/A
Expected Behavior
Running
terraform destroy
should successfully destroy the resources created bygoogle_service_networking_connection
Actual Behavior
Running
terraform destroy
produces errorSteps to reproduce
terraform plan -var-file=vars.tfvars.json -out=execution.tfplan
terraform apply execution.tfplan
terraform destroy -var-file=vars.tfvars.json
Important Factoids
No response
References
No response
b/376331301
The text was updated successfully, but these errors were encountered: