Infrastructure as code on Hetzner

Infrastructure as code on Hetzner

Provisions infrastructure for a Golang application on Hetzner cloud. The code packs a Golang, PostgreSQL, S3(minio) images using packer then launches the infrastructure using Terraform with helpers such as bash, hcloud and supfile. The main reason behind the setup is the make it as cost effective as possible to launch a small to medium project.

Update cloudflare DNS using bash


./ sub-domain [email protected] cloudflare_token

Database backup/restore via S3

Backup/Restore script to auto initiate or backup a database.

Gitlab crontab deploy script

Deploy new builds from Gitlab without exposing your instances security using this simple bash script. It scans the API for a new build, download the latest then executes the script inside of the build. Make sure you have jq installed before you continue.