call me stuff the way i do stuff

This commit is contained in:
nora 2024-02-05 17:16:03 +01:00
parent 8331b28f5d
commit 0eae57ba2e
6 changed files with 105 additions and 21 deletions

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

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