Skip to content

Instantly share code, notes, and snippets.

@greglook
Last active November 11, 2016 19:44
Show Gist options
  • Save greglook/02e4e4273ffac87169fe8520c8916847 to your computer and use it in GitHub Desktop.
Save greglook/02e4e4273ffac87169fe8520c8916847 to your computer and use it in GitHub Desktop.
Don't burn the world down.
terraform() {
case $1 in
apply)
echo "Remember what happened last time? Use 'terraform NO-REALLY-APPLY' to proceed." >&2
return 99
;;
NO-REALLY-APPLY)
shift
local panic_time=15
echo "REALLY APPLYING - MAKE SURE THIS IS WHAT YOU WANT!" >&2
echo "You have $panic_time seconds to decide..." >&2
sleep $panic_time
~/bin/terraform apply "$@"
;;
*)
~/bin/terraform "$@"
;;
esac
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment