Create a Consul cluster with Hetzner Cloud
Parts of the scripts are coming from the fabulous terraform-aws-consul module, which I adopted for use in hcloud.
- Fork the project and download to your disk.
- Go to
tls/
, - Copy
variables.tf.original
tovariables.tf
. - Add missing default values within
variables.tf
- Run
terraform init
,terraform plan
,terraform apply
to create self-signed certificates. Alternatively, you can provide your own CA certificate.ca.crt.pem
, private key.consul.key.pem
and public key.consul.crt.pem
into the packer directory. - Export your
HCLOUD_TOKEN
as environment variable - Go to
packer/
- Run
packer build consul.yaml
- Replace the
image
value in workspace\system.json with the id packer returned on completion.