From bcd96de67b43883d3017823298d46aa6878d553b Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Fri, 2 Nov 2018 10:12:21 -0400 Subject: [PATCH] Only init the aws session when in an AWS context --- config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config.go b/config.go index 4934e98..b33c9a8 100644 --- a/config.go +++ b/config.go @@ -315,7 +315,9 @@ func findRemoteConfigFiles(parameterValues map[string]string) []string { configPaths = strings.Split(configPathString, ":") } - aws_helper.InitAwsSession("") + if awsConfigExist() { + aws_helper.InitAwsSession("") + } tempDir := must(ioutil.TempDir("", "tgf-config-files")).(string) defer os.RemoveAll(tempDir)