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.
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.
TL;DR
Add field
deletion_policy
variable forgoogle_service_networking_connection
inmodules/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:
This is the same symptom as in https://github.com/hashicorp/terraform-provider-google/issues/16275
The
private_service_access
module should add adeletion_policy
variable that is propagated down to thegoogle_service_networking_connection
resource. This will enable successful deletion of the created resources, while the underlying Service Networking Connection is deleted in the background.