mirror of
https://github.com/multipleof4/git.planetrenox.com.git
synced 2026-01-14 00:17:57 +00:00
Update main.tf
This commit is contained in:
@@ -4,23 +4,27 @@ resource "google_project_service" "compute" {
|
|||||||
disable_on_destroy = false
|
disable_on_destroy = false
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "google_compute_firewall" "gitea_allow" {
|
resource "google_compute_firewall" "yunohost_allow" {
|
||||||
name = "allow-gitea-3000-ssh"
|
name = "allow-yunohost"
|
||||||
network = "default"
|
network = "default"
|
||||||
direction = "INGRESS"
|
direction = "INGRESS"
|
||||||
allow {
|
allow {
|
||||||
protocol = "tcp"
|
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"]
|
source_ranges = ["0.0.0.0/0"]
|
||||||
target_tags = ["gitea"]
|
target_tags = ["yunohost"]
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "google_compute_instance" "gitea" {
|
resource "google_compute_instance" "yunohost" {
|
||||||
name = "gitea"
|
name = "yunohost"
|
||||||
machine_type = "e2-micro"
|
machine_type = "e2-small"
|
||||||
zone = "us-west1-a"
|
zone = "us-west1-a"
|
||||||
tags = ["gitea"]
|
tags = ["yunohost"]
|
||||||
boot_disk {
|
boot_disk {
|
||||||
initialize_params {
|
initialize_params {
|
||||||
image = "projects/debian-cloud/global/images/family/debian-12"
|
image = "projects/debian-cloud/global/images/family/debian-12"
|
||||||
@@ -39,5 +43,5 @@ resource "google_compute_instance" "gitea" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
output "external_ip" {
|
output "external_ip" {
|
||||||
value = google_compute_instance.gitea.network_interface[0].access_config[0].nat_ip
|
value = google_compute_instance.yunohost.network_interface[0].access_config[0].nat_ip
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user