Update main.tf

This commit is contained in:
2025-09-11 12:27:52 -07:00
parent 464d2dc08e
commit b66d44160f

View File

@@ -1,8 +1,3 @@
data "google_compute_image" "fedora" {
family = "fedora-cloud-41"
project = "fedora-cloud"
}
resource "google_project_service" "compute" {
project = var.project_id
service = "compute.googleapis.com"
@@ -15,7 +10,7 @@ resource "google_compute_firewall" "gitea_allow" {
direction = "INGRESS"
allow {
protocol = "tcp"
ports = ["22", "3000"]
ports = ["22","3000"]
}
source_ranges = ["0.0.0.0/0"]
target_tags = ["gitea"]
@@ -26,24 +21,20 @@ resource "google_compute_instance" "gitea" {
machine_type = "e2-micro"
zone = "us-west1-a"
tags = ["gitea"]
boot_disk {
initialize_params {
image = data.google_compute_image.fedora.self_link
image = "projects/debian-cloud/global/images/family/debian-12"
size = 30
type = "pd-standard"
}
}
network_interface {
network = "default"
access_config {}
}
metadata = {
startup-script = file("${path.module}/startup.sh")
}
depends_on = [google_project_service.compute]
}