Skip to content

Commit

Permalink
backport of commit d76a8fc
Browse files Browse the repository at this point in the history
  • Loading branch information
jbardin committed May 6, 2021
1 parent 56b8352 commit ab3b94b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions configs/configschema/marks.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ func (b *Block) ValueMarks(val cty.Value, path cty.Path) []cty.PathValueMarks {
}
}

if val.IsNull() {
return pvm
}
for name, blockS := range b.BlockTypes {
// If our block doesn't contain any sensitive attributes, skip inspecting it
if !blockS.Block.ContainsSensitive() {
Expand Down
4 changes: 4 additions & 0 deletions configs/configschema/marks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ func TestBlockValueMarks(t *testing.T) {
cty.UnknownVal(schema.ImpliedType()),
cty.UnknownVal(schema.ImpliedType()),
},
{
cty.NullVal(schema.ImpliedType()),
cty.NullVal(schema.ImpliedType()),
},
{
cty.ObjectVal(map[string]cty.Value{
"sensitive": cty.UnknownVal(cty.String),
Expand Down

0 comments on commit ab3b94b

Please sign in to comment.