Last active
March 28, 2020 11:56
-
-
Save wheelq/312075580ebfdb9cf5d4ec53a183c30f to your computer and use it in GitHub Desktop.
Alias for terraform from docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#echo "alias terraform=' function __terraform(){ docker run --rm -v \"\${PWD}:/src\" -w /src -v ~/.terraform.d:/root/.terraform.d -it hashicorp/terraform:light \$@;unset -f __terraform;}; __terraform'"|tee -a ~/.bash_profile >> ~/.bashrc | |
echo -e "#\!/usr/bin/env bash\nfunction __terraform(){ docker run --rm -v \"\${PWD}:/src\" -w /src -v ~/.terraform.d:/root/.terraform.d -it hashicorp/terraform:light \$@;unset -f __terraform;}; __terraform \$@" >/usr/local/bin/terraform && chmod 755 /usr/local/bin/terraform |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment