separate workspaces

This commit is contained in:
nora 2024-07-13 17:18:00 +02:00
parent 93f2b2c0cf
commit 5250e73722
15 changed files with 97 additions and 22 deletions

15
tf-infra/aws/state.sh Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
BUCKET="nilstrieb-states"
case "$1" in
download)
aws s3api get-object --bucket "$BUCKET" --key "aws-terraform.tfstate" "terraform.tfstate"
;;
upload)
aws s3api put-object --bucket "$BUCKET" --key "aws-terraform.tfstate" --body "terraform.tfstate"
;;
*)
echo "subcommand download or upload required"
exit 1
esac