opentofu/internal/command/testdata/show-json
Martin Atkins cbfeb0fdc8 jsonconfig: Additional details about input variables
The JSON object describing an input variable can now include two additional
properties:

- "type" provides a JSON representation of the variable's type constraint,
  if one is set. Omitted if either there is no constraint declared at all
  or if it's set to "any", which are equivalent and both mean that the
  type is completely unconstrained.

  This uses the standard cty representation of a type constraint, which
  matches how OpenTofu already describes types in the provider protocol,
  in state snapshots, and in saved plan files.
- "required" directly represents whether callers are required to provide
  a value for the variable. This is technically redundant since it is
  set to true unless "default" is also set, but this avoids the need for
  consuming software to reimplement this rule and potentially allows us to
  make this rule more complicated/subtle in future if needed.

For some reason the documentation about the JSON configuration
representation did not previously mention the "variables" property at all,
so this adds documentation for both the new properties and the pre-existing
properties.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-07-11 09:25:30 -07:00
..
basic-create Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
basic-delete Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
basic-update Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
conditions jsonconfig: Additional details about input variables 2025-07-11 09:25:30 -07:00
drift Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
module-depends-on Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
modules Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
moved Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
moved-drift Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
multi-resource-update Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
nested-module-error Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
nested-modules Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
plan-error Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
provider-aliasing Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
provider-aliasing-conflict Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
provider-aliasing-default Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
provider-version Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
provider-version-no-config Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
requires-replace Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
sensitive-values Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
unknown-output json-output: Extended detail for unknown outputs 2022-06-13 14:06:03 -04:00