diff --git a/configs/named_values.go b/configs/named_values.go index e0b708a1e..6f867d6c9 100644 --- a/configs/named_values.go +++ b/configs/named_values.go @@ -25,6 +25,7 @@ type Variable struct { Type cty.Type ParsingMode VariableParsingMode Validations []*VariableValidation + Sensitive bool DescriptionSet bool @@ -94,6 +95,11 @@ func decodeVariableBlock(block *hcl.Block, override bool) (*Variable, hcl.Diagno v.ParsingMode = parseMode } + if attr, exists := content.Attributes["sensitive"]; exists { + valDiags := gohcl.DecodeExpression(attr.Expr, nil, &v.Sensitive) + diags = append(diags, valDiags...) + } + if attr, exists := content.Attributes["default"]; exists { val, valDiags := attr.Expr.Value(nil) diags = append(diags, valDiags...) @@ -534,6 +540,9 @@ var variableBlockSchema = &hcl.BodySchema{ { Name: "type", }, + { + Name: "sensitive", + }, }, Blocks: []hcl.BlockHeaderSchema{ {