You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conditional Deep Merge Control in Terragrunt Includes
Background
Terragrunt's deep merge strategy is a powerful feature for managing configuration across multiple HCL files. However, current implementations lack granular control over variable merging.
Current Limitations
Developers currently face challenges when:
Wanting to selectively merge some variables deeply
Needing to completely replace specific variables
Implementing conditional merge strategies within the same configuration
Detailed Problem Statement
Existing Merge Behavior
When using include with merge_strategy = "deep", Terragrunt performs a comprehensive deep merge of all input variables. This approach doesn't provide flexibility for:
Partial variable overrides
Selective merge control
Complex configuration scenarios
Proposed Solution
Introduce a mechanism to provide per-variable merge control, such as:
Conditional Deep Merge Control in Terragrunt Includes
Background
Terragrunt's deep merge strategy is a powerful feature for managing configuration across multiple HCL files. However, current implementations lack granular control over variable merging.
Current Limitations
Developers currently face challenges when:
Detailed Problem Statement
Existing Merge Behavior
When using
include
withmerge_strategy = "deep"
, Terragrunt performs a comprehensive deep merge of all input variables. This approach doesn't provide flexibility for:Proposed Solution
Introduce a mechanism to provide per-variable merge control, such as:
ignore_deep_merge
flagParent
source.hcl
:Child
child.hcl
:Expected Behavior
my_list_var1: ["1","2","3","4", "x", "y"]
my_list_var2: ["a", "b"]
Proposed Syntax Options
Option 1: Inline Annotation
Option 2: Explicit Configuration
Option 3: Merge Strategy Decorator
The text was updated successfully, but these errors were encountered: