Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Cloud IAP Terraform firewall rule for GKE
resource "google_compute_firewall" "allow_nodes_from_cloud_iap" {
name = "allow-gke-nodes-ssh-from-cloud-iap"
description = "Allow Cloud IAP to communicate with the the GKE nodes."
network =
allow {
protocol = "tcp"
ports = ["22"]
source_ranges = [""]
target_tags = ["k8s-node"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment