Skip to content

Instantly share code, notes, and snippets.

@uolter
Created June 3, 2020 12:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save uolter/80eb4c3affbbe3789bcaadbb04cfaa46 to your computer and use it in GitHub Desktop.
Save uolter/80eb4c3affbbe3789bcaadbb04cfaa46 to your computer and use it in GitHub Desktop.
Useful Terraform and Terrgagrunt aliases
# Terraform
alias trf='terraform'
## Terragrunt
alias trg='terragrunt'
alias trgfmt='terragrunt hclfmt'
alias trglint='find . -type f -not -path "*/\.*" | grep ".hcl" | terragrunt hclfmt'
alias trgcleancache='find . -type d -name ".terragrunt-cache" -prune -exec rm -rf {} \;'
function trginitall() {
echo "trragrunt init-all";
find "$PWD" -not -path '*/.terragrunt-cache/*' -type f -name terragrunt.hcl -printf 'cd "%h" && terragrunt init --terragrunt-non-interactive -input=false\n' | sh -ex
}
alias trginitall=trginitall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment