Add a sensitive attribute
This commit is contained in:
parent
a18e1cb24f
commit
862ddf73e2
|
@ -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{
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue