Site Infrastructure
This repository contains terraform workspaces for setting up my infrastructure
to run my various *.eugenetriguba.com sites.
Getting Started
To get started, you will first want to bootstrap the terraform state bucket within Backblaze B2. To do that, you can run the following script:
./bootstrap-state.sh
This will:
- Setup a state bucket and application key for programmatic terraform access
via the
b2CLI - Setup a Secure Note within 1Password via the
opCLI with the application key credentials
After that, you can setup a .env file with the application key credentials. To
do that, you’ll first need to manually:
- Setup a 1Password ‘Secure Note’ entry called ‘Backblaze B2 Master Key’ with your B2 ‘Master Key’ values as ‘key_id’ and ‘key_value’ fields.
Then, you can run:
./setup-env.sh
Now, you can source the credentials into your shell session with:
source .env
How to Apply a Workspace
Where <workspace> is one of the workspace directories:
cd <workspace>
tofu init
tofu apply
Intended Application Order
The workspaces are intended to be applied in the following order:
hetzner-account: Hetzner root-level account setupb2-backup: Backblaze B2 bucket and host key setuphetzner-web: Web servers on Hetzner setup