update firewall

This commit is contained in:
vincent 2022-10-08 09:12:41 +02:00
parent c174d8fb72
commit f8a0ec9a49
2 changed files with 14 additions and 1 deletions

View File

@ -72,3 +72,16 @@ resource "hcloud_firewall" "ssh" {
] ]
} }
} }
resource "hcloud_firewall" "Gitea_SSH" {
name= "Gitea SSH"
rule {
direction ="in"
protocol = "tcp"
port="2222"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
}

View File

@ -5,7 +5,7 @@ resource "hcloud_server" "HomeLab" {
server_type = var.server_type server_type = var.server_type
location = var.location location = var.location
ssh_keys = [hcloud_ssh_key.default.id] ssh_keys = [hcloud_ssh_key.default.id]
firewall_ids = [hcloud_firewall.prod.id] firewall_ids = [hcloud_firewall.prod.id,hcloud_firewall.Gitea_SSH.id]
labels = { labels = {
} }