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"
"path/filepath"
"runtime"
"sort"
"strings"
"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.
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)
if err != nil {
return diag.FromErr(err)