Skip to content

Commit

Permalink
Revert "updates"
Browse files Browse the repository at this point in the history
This reverts commit 2befcc1.
  • Loading branch information
aknysh committed Dec 8, 2024
1 parent d195ff6 commit 3648d9b
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions internal/exec/stack_processor_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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},
Expand Down

0 comments on commit 3648d9b

Please sign in to comment.