create tf infra for crocus and dns
This commit is contained in:
44
infra/crocus.tf
Normal file
44
infra/crocus.tf
Normal 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"]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user