website: "tofu providers schema" nested_type docs

At some point after this documentation was originally written the schema
structure grew to include the possibility of structural attribute types,
represented using "nested_type" instead of "type" in the attribute
definition, but it seems that the documentation was not updated to mention
that.

This is just a minimal extra note about that focused mainly on just
acknowledging that this possibility exists at all, in case anyone is
relying on these docs to build something to parse this format. It would
probably be helpful to expand both this and the existing documentation to
specify the format more precisely, but my focus here is just on quickly
filling in this missing piece so that the documentation is complete, even
if not detailed and precise.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
This commit is contained in:
Martin Atkins
2025-11-18 14:27:30 -08:00
parent 95d75b3436
commit 82fdad27fc

View File

@@ -125,6 +125,25 @@ A block representation contains "attributes" and "block_types" (which represent
// that the attribute's value must conform to.
"type": "string",
// Some attributes use "nested_type" instead of "type",
// describing an object type or a collection of an object type
// in a similar way as for nested block types. This should take
// priority over "type" if both are present, but for most
// providers only one of the two attributes is returned.
"nested_type": {
// "nesting_mode" describes the nesting mode for the
// attribute value, with the same values as for
// the corresponding property in "block_types" below.
"nesting_mode": "list",
// "attributes" describes the attributes that are
// expected for each nested object, using the same
// structure as the top-level "attributes" property.
"attributes": {
// ...
}
},
// "description" is an English-language description of
// the purpose and usage of the attribute.
"description": "string",