From 3648d9b6c80234223101e6ba88f65a203240c87f Mon Sep 17 00:00:00 2001 From: aknysh Date: Sun, 8 Dec 2024 15:31:21 -0500 Subject: [PATCH] Revert "updates" This reverts commit 2befcc1b75250b64721749a5575405dd5c839499. --- internal/exec/stack_processor_utils.go | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/internal/exec/stack_processor_utils.go b/internal/exec/stack_processor_utils.go index 6ea8e7670..b4cc48090 100644 --- a/internal/exec/stack_processor_utils.go +++ b/internal/exec/stack_processor_utils.go @@ -285,7 +285,7 @@ func ProcessYAMLConfigFile( } } - // Terraform overrides in this stack manifest + // Terraform overrides if o, ok := stackConfigMap["terraform"]; ok { if globalTerraformSection, ok = o.(map[string]any); !ok { return nil, nil, nil, fmt.Errorf("invalid 'terraform' section in the stack manifest '%s'", relativeFilePath) @@ -298,7 +298,15 @@ func ProcessYAMLConfigFile( } } - // Helmfile overrides in this stack manifest + finalTerraformOverrides, err = m.Merge( + cliConfig, + []map[string]any{globalOverrides, terraformOverrides, parentTerraformOverrides}, + ) + if err != nil { + return nil, nil, nil, err + } + + // Helmfile overrides if o, ok := stackConfigMap["helmfile"]; ok { if globalHelmfileSection, ok = o.(map[string]any); !ok { return nil, nil, nil, fmt.Errorf("invalid 'helmfile' section in the stack manifest '%s'", relativeFilePath) @@ -311,16 +319,6 @@ func ProcessYAMLConfigFile( } } - // Final Terraform `overrides` - finalTerraformOverrides, err = m.Merge( - cliConfig, - []map[string]any{globalOverrides, terraformOverrides, parentTerraformOverrides}, - ) - if err != nil { - return nil, nil, nil, err - } - - // Final Helmfile `overrides` finalHelmfileOverrides, err = m.Merge( cliConfig, []map[string]any{globalOverrides, helmfileOverrides, parentHelmfileOverrides},