terraform-config/justfile

51 lines
878 B
Makefile
Raw Normal View History

2024-01-24 09:20:13 +00:00
# try locally
default: local
2024-01-23 23:14:39 +00:00
# encode secrets
encode:
sops --output-type yaml -e .auto.tfvars.json > .auto.tfvars.enc.yaml
# decode secrets
decode:
sops --output-type json -d .auto.tfvars.enc.yaml > .auto.tfvars.json
# log in to the Terraform Cloud backend
login:
tofu login app.terraform.io
# validate logic
validate:
nix run .#validate
# apply changes
2024-01-24 09:20:13 +00:00
apply:
2024-01-23 23:14:39 +00:00
nix run .#apply
# show generated plan
plan:
nix run .#plan
# run CI test locally
ci:
woodpecker-cli exec --env "SOPS_AGE_KEY=$SOPS_AGE_KEY"
# apply changes, approving automatically
cd:
nix run .#cd
# run Nomad jobs locally
local:
nix run .#local
# generate an [`age`](https://age-encryption.org/) key pair
keygen:
rage-keygen -o keys.txt
# remove local state and derived credentials
destroy:
nix run .#destroy
# update dependencies
update:
nix flake update