From 6849dabb3783ce5035311f2041ec8b72d8fae92d Mon Sep 17 00:00:00 2001 From: wobondar Date: Wed, 1 Aug 2018 01:36:13 +0300 Subject: [PATCH] Ability to use ENV variable for local running instead of cli flag --- src/command_env.go | 1 + src/main.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/command_env.go b/src/command_env.go index 671e274..182e52d 100644 --- a/src/command_env.go +++ b/src/command_env.go @@ -92,6 +92,7 @@ func ConfigureEnvCommand(a *App) { cmd.Flag("local", "Generate environment.tf with AWS_PROFILE for local running"). Default("false"). Short('l'). + Envar(TerraformLocalEnvVar). BoolVar(&c.local) } diff --git a/src/main.go b/src/main.go index 1b3e071..0aba419 100644 --- a/src/main.go +++ b/src/main.go @@ -1,8 +1,9 @@ package main -const Version = "v0.3.2" +const Version = "v0.3.3" const CiEnvVar = "CI" +const TerraformLocalEnvVar = "TF_LOCAL" const TerraformEnvVar = "TF_ENV" const ModulesDir = "aws-terraform-modules" const ConfigFile = "config.tf"