infrastructure/terraform/hetzner_firewall.tf
Jake Howard 9fee5c01ef
All checks were successful
/ terraform (push) Successful in 1m30s
/ ansible (push) Successful in 2m48s
Create new walker on Hetzner
2024-05-04 13:20:15 +01:00

52 lines
715 B
HCL

resource "hcloud_firewall" "base" {
name = "base"
rule {
direction = "in"
protocol = "icmp"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
}
resource "hcloud_firewall" "tailscale" {
name = "tailscale"
rule {
direction = "in"
protocol = "udp"
port = "41641"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
}
resource "hcloud_firewall" "web" {
name = "web"
# HTTP
rule {
direction = "in"
protocol = "tcp"
port = "80"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
# HTTPS
rule {
direction = "in"
protocol = "tcp"
port = "443"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
}