diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2026-10-12 18:37:36 -0700 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2026-10-12 18:37:36 -0700 |
| commit | 0bd8634357ed121c0ba5fd3544beefc5c60e37e3 (patch) | |
| tree | 50d6b6f5c9e3f3adf9c91370e6436cd9348abc11 | |
| parent | Add b2-backup workspace for backing up host data (diff) | |
| download | site-infra-0bd8634357ed121c0ba5fd3544beefc5c60e37e3.zip | |
Add README
| -rw-r--r-- | README.md | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..a488ea1 --- /dev/null +++ b/README.md @@ -0,0 +1,59 @@ +# 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: + +```sh +./bootstrap-state.sh +``` + +This will: + +- Setup a state bucket and application key for programmatic terraform access + via the `b2` CLI +- Setup a Secure Note within 1Password via the `op` CLI 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: + +```sh +./setup-env.sh +``` + +Now, you can source the credentials into your shell session with: + +```sh +source .env +``` + +## How to Apply a Workspace + +Where `<workspace>` is one of the workspace directories: + +```sh +cd <workspace> +tofu init +tofu apply +``` + +NOTE: While the official terraform CLI may work, I use the +[opentofu](https://opentofu.org/). + +## Intended Application Order + +The workspaces are intended to be applied in the following order: + +1. `hetzner-account`: Hetzner root-level account setup +2. `b2-backup`: Backblaze B2 bucket and host key setup +3. `hetzner-web`: Web servers on Hetzner setup |