From b8245caa3976790eec1ecd979f5bae73be00e9b2 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Fri, 3 Jan 2025 12:06:09 -0500 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Erik Osterman (CEO @ Cloud Posse) --- internal/exec/shell_utils.go | 2 +- internal/exec/terraform.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/exec/shell_utils.go b/internal/exec/shell_utils.go index 58d4b093b..ab4676af5 100644 --- a/internal/exec/shell_utils.go +++ b/internal/exec/shell_utils.go @@ -193,7 +193,7 @@ func execTerraformShellCommand( envVar := fmt.Sprintf("TF_CLI_ARGS_%s", cmd) existing := os.Getenv(envVar) if existing != "" { - u.LogWarning(atmosConfig, fmt.Sprintf("Found Terraform environment variable '%s' which may conflict with or be overwritten by Atmos", envVar)) + u.LogWarning(atmosConfig, fmt.Sprintf("detected '%s' set in the environment; this may interfere with Atmos's control of Terraform.", envVar)) // Remove any surrounding quotes from existing value existing = strings.Trim(existing, "\"") // Create new value by combining existing and new var-file argument diff --git a/internal/exec/terraform.go b/internal/exec/terraform.go index 768d0346e..991ffbaa6 100644 --- a/internal/exec/terraform.go +++ b/internal/exec/terraform.go @@ -235,7 +235,7 @@ func ExecuteTerraform(info schema.ConfigAndStacksInfo) error { for _, envVar := range os.Environ() { if strings.HasPrefix(envVar, "TF_") { varName := strings.Split(envVar, "=")[0] - u.LogWarning(atmosConfig, fmt.Sprintf("Found Terraform environment variable '%s' which may conflict with or be overwritten by Atmos", varName)) + u.LogWarning(atmosConfig, fmt.Sprintf("detected '%s' set in the environment; this may interfere with Atmos's control of Terraform.", varName)) } }