Skip to content

Commit

Permalink
Update types.variables.go
Browse files Browse the repository at this point in the history
  • Loading branch information
azr committed Feb 14, 2022
1 parent a0ff537 commit 9eff32a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hcl2template/types.variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ func (cfg *PackerConfig) collectInputVariableValues(env []string, files []*hcl.F
// The specified filename is to identify the source of where value originated from in the diagnostics report, if there is an error.
func expressionFromVariableDefinition(filename string, value string, variableType cty.Type) (hclsyntax.Expression, hcl.Diagnostics) {
switch variableType {
case cty.String, cty.Number, cty.NilType:
case cty.String, cty.Number, cty.NilType, cty.DynamicPseudoType:
// when the type is nil (not set in a variable block) we default to
// interpreting everything as a string literal.
return &hclsyntax.LiteralValueExpr{Val: cty.StringVal(value)}, nil
Expand Down

0 comments on commit 9eff32a

Please sign in to comment.