update hcloud provider to 1.36.1

This commit is contained in:
Oli
2022-12-23 13:38:06 +00:00
parent b849a42e7d
commit d0d05f89a1
3 changed files with 132 additions and 18 deletions

View File

@@ -30,3 +30,117 @@ resource "hcloud_firewall" "ssh" {
label_selector = "env=prod"
}
}
resource "hcloud_firewall" "web" {
name = "Webserver"
rule {
direction = "in"
protocol = "tcp"
port = "80"
description = "HTTP"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
rule {
direction = "in"
protocol = "tcp"
port = "443"
description = "HTTPS"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
apply_to {
server = hcloud_server.web.id
}
}
resource "hcloud_firewall" "monitoring" {
name = "Monitoring"
rule {
direction = "in"
protocol = "tcp"
port = "9100"
description = "node-exporter"
source_ips = [
var.bastion_host.ipv4,
var.bastion_host.ipv6
]
}
rule {
direction = "in"
protocol = "tcp"
port = "9558"
description = "systemd-exporter"
source_ips = [
var.bastion_host.ipv4,
var.bastion_host.ipv6
]
}
rule {
direction = "in"
protocol = "tcp"
port = "9187"
description = "postgres-exporter"
source_ips = [
var.bastion_host.ipv4,
var.bastion_host.ipv6
]
}
rule {
direction = "in"
protocol = "tcp"
port = "9113"
description = "nginx-exporter"
source_ips = [
var.bastion_host.ipv4,
var.bastion_host.ipv6
]
}
rule {
direction = "in"
protocol = "tcp"
port = "9253"
description = "php-exporter"
source_ips = [
var.bastion_host.ipv4,
var.bastion_host.ipv6
]
}
rule {
direction = "in"
protocol = "tcp"
port = "9205"
description = "nextcloud"
source_ips = [
var.bastion_host.ipv4,
var.bastion_host.ipv6
]
}
rule {
direction = "in"
protocol = "tcp"
port = "9206"
description = "nextcloud_push"
source_ips = [
var.bastion_host.ipv4,
var.bastion_host.ipv6
]
}
rule {
direction = "in"
protocol = "tcp"
port = "5572"
description = "rclone"
source_ips = [
var.bastion_host.ipv4,
var.bastion_host.ipv6
]
}
# apply_to {
# server = hcloud_server.web.id
# }
}