This module automatically forms LXD cluster on Hetzner Cloud. This terraform module will do the following:
- Setup networking
- Setup bastion node
- Setup compute instances
- Setup Private Key access
- Automatically form a cluster
- Destroy a cluster
- Enable removal of specific nodes gracefully
- Protect against
database-leader
deletion
These functionality come together to enable the user to fully manage LXD cluster using IaC (infrastructure as code)
Name | Version |
---|---|
terraform | >= 1.0.0 |
hcloud | ~> 1.38 |
tls | 4.0.4 |
Name | Version |
---|---|
cloudinit | 2.3.2 |
hcloud | 1.38.2 |
ssh | 2.6.0 |
terraform | n/a |
tls | 4.0.4 |
No modules.
Name | Type |
---|---|
hcloud_firewall.bastion_firewall | resource |
hcloud_firewall.nodes_firewall | resource |
hcloud_network.cluster_vpc | resource |
hcloud_network_subnet.cluster_subnet | resource |
hcloud_placement_group.nodes_group | resource |
hcloud_server.bastion | resource |
hcloud_server.bootstrap_node | resource |
hcloud_server.nodes | resource |
hcloud_ssh_key.bastion | resource |
hcloud_ssh_key.terraform_cloud | resource |
ssh_resource.cluster_join_token | resource |
ssh_resource.node_detail | resource |
ssh_resource.trust_token | resource |
terraform_data.reboot | resource |
terraform_data.removal | resource |
tls_private_key.bastion_key | resource |
tls_private_key.terraform_cloud | resource |
cloudinit_config.config | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
bastion_size | Size of the bastion instance defaults to Basic 512MB instance https://slugs.do-api.dev/ | string |
"cx11" |
no |
cluster_name | Name of your cluster | any |
n/a | yes |
cluster_topology | How many nodes do you want in your cluster? | list(object({ |
[] |
no |
hcloud_token | Hetzner Cloud API Token | any |
n/a | yes |
image | Image type of choice default is Ubuntu 22.04 | string |
"ubuntu-22.04" |
no |
location | Location of your server | string |
"fsn1" |
no |
node_size | Type of server you want to provision | string |
"cpx11" |
no |
protect_leader | Protect the node marked with database-leader | bool |
true |
no |
region | Region of your cluster | string |
"eu-central" |
no |
ssh_keys | List of ssh key names | list(string) |
[] |
no |
storage_size | How big is the storage dedicated to the cluster | any |
n/a | yes |
subnet_ip_range | Subnet ip range | string |
"10.0.1.0/24" |
no |
Name | Description |
---|---|
cluster_address | n/a |
trust_token | n/a |