mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
15 lines
385 B
Bash
Executable file
15 lines
385 B
Bash
Executable file
#!/usr/bin/env 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
|