Skip to content

Instantly share code, notes, and snippets.

@jakowicz
Last active December 5, 2018 17:34
Show Gist options
  • Save jakowicz/33219d678170af59a9da819b811f3139 to your computer and use it in GitHub Desktop.
Save jakowicz/33219d678170af59a9da819b811f3139 to your computer and use it in GitHub Desktop.
When your provider doesn't understand dependencies :(
alias taa="terraform apply -auto-approve"
alias tda=""terraform destroy -auto-approve"
function taaa {
run=${1:-1}
echo '------------------------'
print "APPLY NUMBER: $run"
echo '------------------------'
taa
if [ $? != 0 ]; then taaa `expr $run + 1`; fi
}
function tdaa {
run=${1:-1}
echo '------------------------'
print "DESTROY NUMBER: $run"
echo '------------------------'
tda
if [ $? != 0 ]; then tdaa `expr $run + 1`; fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment