Hi,
I have a nested map attribute that I want to validate in my tests:
"domains": schema.MapNestedAttribute{
MarkdownDescription: "...",
Required: true,
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"comment": schema.StringAttribute{
MarkdownDescription: "...",
Optional: true,
},
},
},
},
If this was a set, then in my tests I’d validate the set by checking its length like…
resource.TestCheckResourceAttr("example.test", "domains.#", "2"),
But in the case of a ‘map’ type, I’m not sure how you would assert it contained for example two keys?
Any guidance appreciated. Thanks!