Proof of Concept how you could automate your minecraft server deployment.
- Fork the repository
- Create TFE workspace with api-driven workflow, add a generated TFE token (with access to that workspace) as
TF_API_TOKEN
to the Github Repo secrets - Generate a ssh-key of type
ed25519
. The public key should be in thelocal.ssh_keys
var of terraform/servers.tf and the private key should be in the Github repo secrets asSSH_KEY
- Create a read-only token in a hetzner cloud project and add it as
HCLOUD_TOKEN
to the Github repo secrets - Add / Remove servers in terraform/servers.tf
- Add / Change minecraft settings either in ansible/groups_vars/all.yml or per server in ansible/host_vars/servername.yml
- Let the magic happen by heading to the Github Actions tab and triggering the "Continuous Deployment" workflow
Note: Deployment's are only done on main
branch. All other branches will get validation for Terraform & Ansible and if you use a PR to change something on main
(rather than a commit which directly triggers the deployment) you can see a Terraform plan in your PR with the changes that you suggest.
Use terraform-docs and the following command to generate the documentation:
terraform-docs markdown --indent 3 --output-file ../README.md terraform
Name | Version |
---|---|
hcloud | 1.33.2 |
hetznerdns | 2.1.0 |
Name | Version |
---|---|
hetznerdns | 2.1.0 |
Name | Source | Version |
---|---|---|
monkey | app.terraform.io/technat/vm/hcloud | 1.0.1 |
Name | Type |
---|---|
hetznerdns_record.monkey_technat_dev_a | resource |
hetznerdns_record.monkey_technat_dev_aaaa | resource |
hetznerdns_zone.technat_dev | data source |
No inputs.
No outputs.