feat: inject cli state values (--state-values-set) into environment templating context

Signed-off-by: Vincent Chenal <vincent.chenal@protonmail.com>
This commit is contained in:
Vincent Chenal 2025-02-07 11:24:53 +01:00
parent 63e2684ade
commit dfd68faef0
No known key found for this signature in database
GPG Key ID: D0938A925FBBF580
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ func (ld *EnvironmentValuesLoader) LoadEnvironmentValues(missingFileHandler *str
if strings.HasSuffix(f, ".hcl") { if strings.HasSuffix(f, ".hcl") {
hclLoader.AddFile(f) hclLoader.AddFile(f)
} else { } else {
tmplData := NewEnvironmentTemplateData(env, "", map[string]any{}) tmplData := NewEnvironmentTemplateData(env, "", env.Values)
r := tmpl.NewFileRenderer(ld.fs, filepath.Dir(f), tmplData) r := tmpl.NewFileRenderer(ld.fs, filepath.Dir(f), tmplData)
bytes, err := r.RenderToBytes(f) bytes, err := r.RenderToBytes(f)
if err != nil { if err != nil {