Terraform module to manage the following Hetzner Cloud resource:
- hcloud_firewall
Copy and paste into your Terraform configuration, insert the variables and run terraform init
:
module "hcloud_firewall" {
source = "dhoppeIT/firewall/hcloud"
version = "~> 0.1"
name = "default"
rule = [
{
direction = "in"
protocol = "icmp"
source_ips = ["0.0.0.0/0"]
},
{
direction = "in"
protocol = "tcp"
port = "22"
source_ips = ["0.0.0.0/0"]
},
{
direction = "out"
protocol = "icmp"
destination_ips = ["0.0.0.0/0"]
},
{
direction = "out"
protocol = "tcp"
port = "53"
destination_ips = ["0.0.0.0/0"]
},
{
direction = "out"
protocol = "udp"
port = "53"
destination_ips = ["0.0.0.0/0"]
},
{
direction = "out"
protocol = "tcp"
port = "80"
destination_ips = ["0.0.0.0/0"]
},
{
direction = "out"
protocol = "tcp"
port = "443"
destination_ips = ["0.0.0.0/0"]
}
]
}
Name | Version |
---|---|
terraform | >= 1.3 |
hcloud | ~> 1.0 |
Name | Version |
---|---|
hcloud | 1.36.0 |
No modules.
Name | Type |
---|---|
hcloud_firewall.default | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
apply_to | Resources the firewall should be assigned to | list(object({ |
[] |
no |
labels | User-defined labels (key-value pairs) should be created with | map(string) |
{} |
no |
name | Name of the Firewall | string |
null |
no |
rule | Configuration of a Rule from this Firewall | list(object({ |
[] |
no |
Name | Description |
---|---|
id | Unique ID of the Firewall |
name | Name of the Firewall |
Created and maintained by Dennis Hoppe.
Apache 2 licensed. See LICENSE for full details.