Skip to content

Commit 3642e34

Browse files
committed
fix: made sure terraform destruction doesn't fail due to incorrect dependencies
1 parent 57c952c commit 3642e34

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/frontend/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ resource "google_compute_global_forwarding_rule" "internal_managed_http" {
8888
network = local.internal_network
8989
subnetwork = each.value.subnetwork
9090
ip_address = each.value.address
91+
depends_on = [google_compute_subnetwork.proxy_only]
9192
}
9293

9394
resource "google_compute_global_forwarding_rule" "https" {
@@ -118,6 +119,7 @@ resource "google_compute_global_forwarding_rule" "internal_managed_https" {
118119
network = local.internal_network
119120
subnetwork = each.value.subnetwork
120121
ip_address = each.value.address
122+
depends_on = [google_compute_subnetwork.proxy_only]
121123
}
122124

123125
resource "google_compute_global_address" "default" {
@@ -158,6 +160,7 @@ resource "google_compute_global_forwarding_rule" "internal_managed_http_ipv6" {
158160
load_balancing_scheme = var.load_balancing_scheme
159161
subnetwork = each.value.subnetwork
160162
ip_address = each.value.address
163+
depends_on = [google_compute_subnetwork.proxy_only]
161164
}
162165

163166
resource "google_compute_global_forwarding_rule" "https_ipv6" {
@@ -187,6 +190,7 @@ resource "google_compute_global_forwarding_rule" "internal_managed_https_ipv6" {
187190
load_balancing_scheme = var.load_balancing_scheme
188191
subnetwork = each.value.subnetwork
189192
ip_address = each.value.address
193+
depends_on = [google_compute_subnetwork.proxy_only]
190194
}
191195

192196
resource "google_compute_global_address" "default_ipv6" {

0 commit comments

Comments
 (0)