create tf infra for crocus and dns

This commit is contained in:
2025-02-05 20:36:42 +01:00
parent aedd4a6f1c
commit f6e040da19
7 changed files with 141 additions and 0 deletions

44
infra/crocus.tf Normal file
View File

@@ -0,0 +1,44 @@
resource "hcloud_server" "crocus_server" {
name = "crocus"
server_type = "cx22"
image = "ubuntu-20.04"
firewall_ids = [hcloud_firewall.crocus_firewall.id]
}
resource "hcloud_firewall" "crocus_firewall" {
name = "crocus-firewall"
rule {
direction = "in"
protocol = "icmp"
source_ips = ["0.0.0.0/0", "::/0"]
}
rule {
direction = "in"
protocol = "tcp"
port = "22"
source_ips = ["0.0.0.0/0", "::/0"]
}
rule {
direction = "in"
protocol = "tcp"
port = "22"
source_ips = ["0.0.0.0/0", "::/0"]
}
rule {
direction = "in"
protocol = "tcp"
port = "80"
source_ips = ["0.0.0.0/0", "::/0"]
}
rule {
direction = "in"
protocol = "tcp"
port = "443"
source_ips = ["0.0.0.0/0", "::/0"]
}
}