I’m using the new Framework Plugin and I’ve noticed that a MapNestedAttribute
is showing as hidden elements when executing terraform show
.
Here is my schema:
"domains": schema.MapNestedAttribute{
MarkdownDescription: "...",
Required: true,
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"name": schema.StringAttribute{
MarkdownDescription: "...",
Required: true,
},
"comment": schema.StringAttribute{
MarkdownDescription: "...",
Optional: true,
},
},
},
},
It wasn’t until I marshalled that data into json that it revealed they were marked as ‘sensitive’ data. It’s unclear why though.
terraform show -json | jq '.values.root_module.resources' | jq '.[0].sensitive_values'
{
"domains": {
"example-1": {},
"example-2": {}
}
}
Can anyone explain this?
Thanks!