From 12dbe5071f6dde0ac18ecae27141a564e30baa90 Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Thu, 11 Sep 2025 13:29:25 -0700 Subject: [PATCH] Update main.tf --- terraform/main.tf | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/terraform/main.tf b/terraform/main.tf index 66669c8..04008bb 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -4,23 +4,27 @@ resource "google_project_service" "compute" { disable_on_destroy = false } -resource "google_compute_firewall" "gitea_allow" { - name = "allow-gitea-3000-ssh" - network = "default" - direction = "INGRESS" +resource "google_compute_firewall" "yunohost_allow" { + name = "allow-yunohost" + network = "default" + direction = "INGRESS" allow { protocol = "tcp" - ports = ["22","3000"] + ports = ["22", "25", "80", "443", "587", "993", "5222", "5269"] + } + allow { + protocol = "udp" + ports = ["53", "5353"] } source_ranges = ["0.0.0.0/0"] - target_tags = ["gitea"] + target_tags = ["yunohost"] } -resource "google_compute_instance" "gitea" { - name = "gitea" - machine_type = "e2-micro" +resource "google_compute_instance" "yunohost" { + name = "yunohost" + machine_type = "e2-small" zone = "us-west1-a" - tags = ["gitea"] + tags = ["yunohost"] boot_disk { initialize_params { image = "projects/debian-cloud/global/images/family/debian-12" @@ -39,5 +43,5 @@ resource "google_compute_instance" "gitea" { } output "external_ip" { - value = google_compute_instance.gitea.network_interface[0].access_config[0].nat_ip -} \ No newline at end of file + value = google_compute_instance.yunohost.network_interface[0].access_config[0].nat_ip +}