Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
  • Loading branch information
milldr and osterman authored Jan 3, 2025
1 parent 971be07 commit b8245ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/exec/shell_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/exec/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down

0 comments on commit b8245ca

Please sign in to comment.