Skip to content

Commit

Permalink
Merge pull request #7 from alexproca/suggestion-for-issue-2-destroy-i…
Browse files Browse the repository at this point in the history
…ngressgateway

Suggestion for issue #2 - Delete ingress when destroy
  • Loading branch information
murphye committed Jan 17, 2022
2 parents c36ac48 + 59cfe2f commit 9660e74
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion terraform/load-balancer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,11 @@ resource "google_compute_firewall" "default" {
}
target_tags = ["${var.gke_cluster_name}"]
direction = "INGRESS"
}
}
resource "null_resource" "decomission_ingressgateway" {
provisioner "local-exec" {
when = destroy
# Delete ingressgateway on destroy
command = "gcloud compute network-endpoint-groups delete ingressgateway --quiet"
}
}

0 comments on commit 9660e74

Please sign in to comment.