diff options
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/config/merge.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/config/merge.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/config/merge.go b/vendor/github.com/hashicorp/terraform/config/merge.go index db214be..55fc864 100644 --- a/vendor/github.com/hashicorp/terraform/config/merge.go +++ b/vendor/github.com/hashicorp/terraform/config/merge.go | |||
@@ -137,6 +137,17 @@ func Merge(c1, c2 *Config) (*Config, error) { | |||
137 | } | 137 | } |
138 | } | 138 | } |
139 | 139 | ||
140 | // Local Values | ||
141 | // These are simpler than the other config elements because they are just | ||
142 | // flat values and so no deep merging is required. | ||
143 | if localsCount := len(c1.Locals) + len(c2.Locals); localsCount != 0 { | ||
144 | // Explicit length check above because we want c.Locals to remain | ||
145 | // nil if the result would be empty. | ||
146 | c.Locals = make([]*Local, 0, len(c1.Locals)+len(c2.Locals)) | ||
147 | c.Locals = append(c.Locals, c1.Locals...) | ||
148 | c.Locals = append(c.Locals, c2.Locals...) | ||
149 | } | ||
150 | |||
140 | return c, nil | 151 | return c, nil |
141 | } | 152 | } |
142 | 153 | ||