Skip to content

Instantly share code, notes, and snippets.

@mlabouardy
Created January 5, 2019 11:10
Show Gist options
  • Select an option

  • Save mlabouardy/b79def752430e7d36958025873982e85 to your computer and use it in GitHub Desktop.

Select an option

Save mlabouardy/b79def752430e7d36958025873982e85 to your computer and use it in GitHub Desktop.
Docker swarm port requirements in GCP
resource "google_compute_firewall" "swarm" {
name = "swarm-firewall"
network = "${google_compute_network.swarm.name}"
allow {
protocol = "icmp"
}
allow {
protocol = "tcp"
ports = ["22", "2377", "7946"]
}
allow {
protocol = "udp"
ports = ["7946", "4789"]
}
source_ranges = ["0.0.0.0/0"]
}
resource "google_compute_network" "swarm" {
name = "swarm-network"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment