terraform-google-sql-db icon indicating copy to clipboard operation
terraform-google-sql-db copied to clipboard

Add field `deletion_policy` to `google_service_networking_connection` in `modules/private_service_access`

Open pwschuurman opened this issue 11 months ago • 0 comments

TL;DR

Add field deletion_policy variable for google_service_networking_connection in modules/private_service_access

Terraform Resources

No response

Detailed design

Deleting a Terraform plan that uses both PSC and CloudSQL results in a error when deleting:

Error: Unable to remove Service Networking Connection, err: Error waiting for Delete Service Networking Connection: Error code 9, message: Failed to delete connection; Producer services (e.g. CloudSQL, Cloud Memstore, etc.) are still using this connection.

This is the same symptom as in https://github.com/hashicorp/terraform-provider-google/issues/16275

The private_service_access module should add a deletion_policy variable that is propagated down to the google_service_networking_connection resource. This will enable successful deletion of the created resources, while the underlying Service Networking Connection is deleted in the background.



### Additional information

_No response_

pwschuurman avatar Mar 19 '24 23:03 pwschuurman