Go to file
Kiara Grouwstra 47d40e487f configure ssh keys 2024-01-15 22:07:10 +01:00
lib configure ssh keys 2024-01-15 22:07:10 +01:00
ssh-keys configure ssh keys 2024-01-15 22:07:10 +01:00
.envrc poc: terranix 2024-01-13 16:31:46 +01:00
.gitignore poc: terranix 2024-01-13 16:31:46 +01:00
.terraform.lock.hcl poc: terranix-hcloud 2024-01-14 08:43:47 +01:00
.woodpecker.yml ci: steps (#3) 2023-08-13 10:22:44 +00:00
README.md poc: hcloud thru terranix 2024-01-13 17:16:49 +01:00
config.nix configure ssh keys 2024-01-15 22:07:10 +01:00
flake.lock poc: terranix 2024-01-13 16:31:46 +01:00
flake.nix poc: terranix 2024-01-13 16:31:46 +01:00
treefmt.toml poc: terranix 2024-01-13 16:31:46 +01:00

README.md

terraform

Contains Terraform code used to manage our infrastructure, Nix'ified for Terranix.

Prerequisites

Usage

  • Run nix develop -c $SHELL to enter the development environment if not using direnv.
  • Run tofu login app.terraform.io to log in to the Terraform Cloud backend
  • Run nix run to apply changes.
  • Run nix flake update to update dependencies.

Authentication

Create a file terraform.tfvars containing:

hcloud_api_token = "<HETZNER_API_KEY>"

... substituting in our actual key.

Managed state

HCL to Nix

Code-styling

We try to adhere to the naming conventions and code-styling best practices defined at Terraform best practices.

Secrets

Two steps:

  1. Create a variable in variables.tf with sensitive = true, to prevent it from appearing in the build output.
  2. Add the desired variable to the Environment Variables.

We may want to look at something like git-crypt or a central password store.