Skip to content

Commit

Permalink
fix: Abandon service network connections (#216)
Browse files Browse the repository at this point in the history
Abandon networking connection on destroy

fix: Destroying `google_service_networking_connection` fails because it has other attachments. We see errors like this:

`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`

Per hashicorp/terraform-provider-google#16275, let's set the deletion policy to `ABANDON`
  • Loading branch information
mwhooker authored Feb 6, 2025
1 parent 57b6a23 commit 8620198
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/networking/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ resource "google_service_networking_connection" "default" {
network = google_compute_network.vpc.id
service = "servicenetworking.googleapis.com"
reserved_peering_ranges = [google_compute_global_address.private_ip_address.name]
deletion_policy = "ABANDON"
}

resource "google_compute_global_address" "api_psc" {
Expand Down

0 comments on commit 8620198

Please sign in to comment.