diff --git a/.bashrc b/.bashrc index 1067cea433467bcc7827b2ab074082a3751088df..5e31e5e3a3f9309dc94fa87122c1ccc2a7203038 100644 --- a/.bashrc +++ b/.bashrc @@ -161,6 +161,16 @@ tr () { fi } +ti () { + workspace="$(terraform workspace show)" + if [ "$workspace" = "default" ] + then + terraform import "$@" + else + terraform import -var-file "$workspace.tfvars" "$@" + fi +} + genpass () { bytes="${1:-32}" head --bytes="$bytes" /dev/urandom | base64 --wrap=0