about summary refs log tree commit diff
path: root/users/wpcarro/terraform/gcp.tf
diff options
context:
space:
mode:
Diffstat (limited to 'users/wpcarro/terraform/gcp.tf')
-rw-r--r--users/wpcarro/terraform/gcp.tf22
1 files changed, 20 insertions, 2 deletions
diff --git a/users/wpcarro/terraform/gcp.tf b/users/wpcarro/terraform/gcp.tf
index f287e90e919d..b02be762ad73 100644
--- a/users/wpcarro/terraform/gcp.tf
+++ b/users/wpcarro/terraform/gcp.tf
@@ -15,8 +15,7 @@ resource "google_compute_instance" "default" {
   tags = [
     "http-server",
     "https-server",
-    "mosh-server",
-    "quassel-core",
+    "diogenes-firewall"
   ]
 
   boot_disk {
@@ -44,4 +43,23 @@ resource "google_compute_instance" "default" {
   service_account {
     scopes = ["cloud-platform"]
   }
+}
+
+resource "google_compute_firewall" "default" {
+  name = "diogenes-firewall"
+  network = "default"
+
+  allow {
+    protocol = "tcp"
+    ports = ["6698"]
+  }
+
+  allow {
+    protocol = "udp"
+    ports = [
+      "60000-61000" # mosh
+    ]
+  }
+
+  source_tags = ["diogenes-firewall"]
 }
\ No newline at end of file