Terraform module to manage the Hetzner Cloud resources.
Copy and paste into your Terraform configuration, insert the variables and run terraform init
:
module "hcloud_ssh_key" {
source = "dhoppeIT/ssh_key/hcloud"
name = "terraform"
public_key = "~/.ssh/id_terraform.pub"
}
module "hcloud_network" {
source = "dhoppeIT/network/hcloud"
name = "private"
ip_range_network = "10.0.0.0/16"
type = "cloud"
ip_range_subnet = ["10.0.0.0/24"]
network_zone = "eu-central"
}
module "hcloud_firewall" {
source = "dhoppeIT/firewall/hcloud"
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.0 |
hcloud | ~> 1.0 |
No providers.
Name | Source | Version |
---|---|---|
hcloud_firewall | dhoppeIT/firewall/hcloud | ~> 0.2 |
hcloud_network | dhoppeIT/network/hcloud | ~> 0.3 |
hcloud_ssh_key | dhoppeIT/ssh_key/hcloud | ~> 0.2 |
No resources.
No inputs.
No outputs.
Created and maintained by Dennis Hoppe.
Apache 2 licensed. See LICENSE for full details.