about summary refs log tree commit diff
path: root/templater/templater.go
diff options
context:
space:
mode:
Diffstat (limited to 'templater/templater.go')
-rw-r--r--templater/templater.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/templater/templater.go b/templater/templater.go
index a2c860c60d3d..5c1db77aadfd 100644
--- a/templater/templater.go
+++ b/templater/templater.go
@@ -99,6 +99,11 @@ func templateFile(c *context.Context, rs *context.ResourceSet, filename string)
 
 	var b bytes.Buffer
 
+	// Guard against empty map before merging keys
+	if rs.Values == nil {
+		rs.Values = make(map[string]interface{}, 0)
+	}
+
 	// Merge global and resourceset-specific values (don't override from global)
 	for k, v := range c.Global {
 		if _, ok := rs.Values[k]; !ok {