opentofu/internal/command/jsonplan
Alisdair McDiarmid c5d10bdef1 core: Store condition block results in plan
In order to include condition block results in the JSON plan output, we
must store them in the plan and its serialization.

Terraform can evaluate condition blocks multiple times, so we must be
able to update the result. Accordingly, the plan.Conditions object is a
map with keys representing the condition block's address. Condition
blocks are not referenceable in any other context, so this address form
cannot be used anywhere in the configuration.

The commit includes a new test case for the JSON output of a
refresh-only plan, which is currently the only way for a failing
condition result to be rendered through this path.
2022-04-04 15:36:29 -04:00
..
condition.go core: Store condition block results in plan 2022-04-04 15:36:29 -04:00
doc.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
module.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
plan_test.go jsonplan: Improve performance for deep objects 2022-02-18 17:00:18 -05:00
plan.go core: Store condition block results in plan 2022-04-04 15:36:29 -04:00
resource.go json-output: Previous address for resource changes 2021-09-20 15:25:23 -04:00
values_test.go jsonplan and jsonstate: include sensitive_values in state representations (#28889) 2021-06-14 09:19:13 -04:00
values.go de-linting 2021-09-01 11:36:21 -04:00