Allow user variables to be interpreted within the variables section of the template.

This commit is contained in:
Megan Marsh 2019-03-07 09:37:31 -08:00
parent 0196d7f835
commit 7cb31714ad
1 changed files with 2 additions and 1 deletions

View File

@ -303,7 +303,7 @@ func (c *Core) init() error {
// Go through the variables and interpolate the environment variables
ctx := c.Context()
ctx.EnableEnv = true
ctx.UserVariables = nil
ctx.UserVariables = make(map[string]string)
for k, v := range c.Template.Variables {
// Ignore variables that are required
if v.Required {
@ -324,6 +324,7 @@ func (c *Core) init() error {
}
c.variables[k] = def
ctx.UserVariables = c.variables
}
for _, v := range c.Template.SensitiveVariables {