Files
opentf/internal/command
Alisdair McDiarmid 9497b2cd6f json-output: Fix unknowns for tuples and sets
The JSON output for sequences previously omitted unknown values for
tuples and sets, which made it impossible to interpret the corresponding
unknown marks. For example, consider this resource:

    resource "example_resource" "example" {
      tags = toset(["alpha", timestamp(), "charlie"])
    }

This would previously be encoded in JSON as:

    "after": {
        "tags": ["alpha", "charlie"]
    },
    "after_unknown": {
        "id": true,
        "tags": [false, true, false]
    },

That is, the timestamp value would be omitted from the output
altogether, while the corresponding unknown marks would include a value
for each of the set members.

This commit changes the behaviour to:

    "after": {
        "tags": ["alpha", null, "charlie"]
    },
    "after_unknown": {
        "id": true,
        "tags": [false, true, false]
    },

This aligns tuples and sets with the prior behaviour for lists, and
makes it clear which elements are known and which are unknown.
2022-06-13 14:33:40 -04:00
..
2021-08-17 15:20:05 -07:00
2021-05-17 14:09:07 -07:00
2021-05-17 14:09:07 -07:00
2021-05-17 14:09:07 -07:00
2021-05-17 14:09:07 -07:00
2022-03-25 14:31:52 +00:00
2021-10-28 11:51:39 -04:00
2021-05-17 14:09:07 -07:00
2022-03-30 09:52:49 +01:00
2021-05-17 14:09:07 -07:00
2021-05-17 14:09:07 -07:00