From ba2b1aa85563472e92a91456dbcf9408339b9837 Mon Sep 17 00:00:00 2001 From: ignuki Date: Sat, 29 Mar 2025 21:05:05 +0100 Subject: [PATCH] generalize iac aliases --- zsh/.zsh_aliases | 100 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 89 insertions(+), 11 deletions(-) diff --git a/zsh/.zsh_aliases b/zsh/.zsh_aliases index 19671f5..798df99 100644 --- a/zsh/.zsh_aliases +++ b/zsh/.zsh_aliases @@ -13,18 +13,96 @@ alias egrep='egrep --color=auto' alias d='dirs -v' for index ({1..9}) alias "c$index"="cd +${index}"; unset index -alias tf="aws-vault exec feedzai-main -d 8h -- terraform" -alias tfi="aws-vault exec feedzai-main -d 8h -- terraform init" -alias tfp="aws-vault exec feedzai-main -d 8h -- terraform plan -lock=false" -alias tfa="aws-vault exec feedzai-main -d 8h -- terraform apply" -alias tfu="aws-vault exec feedzai-main -d 8h -- terraform get -update" +_get_aws_config_path() { + local config_path="${AWS_CONFIG_FILE:-$HOME/.aws/config}" + echo "$config_path" +} -alias tg="aws-vault exec feedzai-main -d 8h -- terragrunt" -alias tgi="aws-vault exec feedzai-main -d 8h -- terragrunt init" -alias tgp="aws-vault exec feedzai-main -d 8h -- terragrunt plan -lock=false" -alias tga="aws-vault exec feedzai-main -d 8h -- terragrunt apply" -alias tgu="aws-vault exec feedzai-main -d 8h -- terragrunt get -update" -alias tgg="aws-vault exec feedzai-main -d 8h -- terragrunt graph-dependencies" +# This label will be set in a comment in the ~/.aws/config file right before +# the definition of the profile we want to use as the default. +# The format will be `#[