sort keys in debug output in terraform mutator

This commit is contained in:
Denis Bilenko 2025-01-24 19:29:26 +01:00
parent 1d5980a11e
commit add7123277
1 changed files with 4 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import (
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"runtime" "runtime"
"sort"
"strings" "strings"
"time" "time"
@ -301,7 +302,9 @@ func (m *initialize) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnosti
} }
// Configure environment variables for auth for Terraform to use. // Configure environment variables for auth for Terraform to use.
log.Debugf(ctx, "Environment variables for Terraform: %s", strings.Join(maps.Keys(environ), ", ")) keys := maps.Keys(environ)
sort.Strings(keys)
log.Debugf(ctx, "Environment variables for Terraform: %s", strings.Join(keys, ", "))
err = tf.SetEnv(environ) err = tf.SetEnv(environ)
if err != nil { if err != nil {
return diag.FromErr(err) return diag.FromErr(err)