state: add SOPS-encrypted terraform state to git

- SOPS + age encrypts all 101 .tfstate files (JSON-aware: keys visible, values encrypted)
- scripts/state-sync: encrypt/decrypt/commit wrapper
- scripts/tg: auto-decrypt before ops, auto-encrypt+commit after apply/destroy
- terragrunt.hcl: -backup=- prevents backup file accumulation
- .gitignore: track .tfstate.enc, ignore plaintext .tfstate
- Cleaned 964MB of stale backups (state/backups/, .backup files)
This commit is contained in:
Viktor Barzin 2026-03-17 22:37:56 +00:00
parent 12a51c4ffa
commit b6faa24349
99 changed files with 159728 additions and 6 deletions

View file

@ -26,6 +26,11 @@ terraform {
]
}
extra_arguments "no_backup" {
commands = ["apply", "plan", "destroy", "import"]
arguments = ["-backup=-"]
}
extra_arguments "kube_config" {
commands = get_terraform_commands_that_need_vars()
arguments = [