terraform-google-sql-db
terraform-google-sql-db copied to clipboard
Add field `deletion_policy` to `google_service_networking_connection` in `modules/private_service_access`
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_