Commit graph

14 commits

Author SHA1 Message Date
Radek Simko
0fe906fa8c make copyrightfix 2026-02-17 13:56:34 +00:00
Samsondeen
719aefdb89
tf query: ready list blocks for beta (#37619) 2025-09-17 12:29:04 +02:00
Kristin Laemmert
9256074c43
Actions in plan/changes (#37320)
* Add actions to the plans and change
* jsonplan - ignoring LinkedResources for now, those are not in the MVP
* pausing here: we'll work on the plan rendering later
2025-07-17 08:19:57 -04:00
Daniel Banck
ab04e5cfec
Include list resource schemas in provider json schemas (TF-25497) (#37163)
* Include list schemas in provider json schemas

* Only include list schemas in experimental builds
2025-06-30 10:59:19 +02:00
Daniel Banck
10c9b64007
Rename schema.Block to Body (#36629) 2025-03-04 16:33:43 +01:00
Liam Cervante
f0b61090a2
Move the testing MockProvider into a dedicated shared package (#34681)
* move the testing MockProvider into a dedicated shared package

* address comments

* fix new changes
2024-02-16 10:35:29 +01:00
Martin Atkins
17f420102f states: Local values no longer live in state
Back when we added local values (a long time ago now!) we put their
results in state mainly just because it was the only suitable shared data
structure to keep them in. They are a bit ideosyncratic there because we
intentionally discard them when serializing state to a snapshot, and
that's just fine because they never need to be retained between runs
anyway.

We now have namedvals.State for all of our named value result storage
needs, so we can remove the local-value-related fields of states.Module
and use the relevant map inside the local value state instead.

As of this commit, states.State now tracks only the data that we
actually persist between runs in state snapshots, which will hopefully
avoid future bugs resulting from the former difference in fidelity
between a freshly-created in-memory state vs. one loaded from a
snapshot.
2023-12-07 09:56:36 -08:00
Martin Atkins
b0b8d4aa6f states: Only track root module output values
For a very long time we've had an annoying discrepancy between the
in-memory state model and our state snapshot format where the in-memory
format stores output values for all modules whereas the snapshot format
only tracks the root module output values because those are all we
actually need to preserve between runs.

That design wart was a result of us using the state both as an internal
and an external artifact, due to having nowhere else to store the
transient values of non-root module output values while Terraform Core
does its work.

We now have namedvals.State to internally track all of the throwaway
results from named values that don't need to persist between runs, so now
we'll use that for our internal work instead and reserve the states.State
model only for the data that we will preserve between runs in state
snapshots.

The namedvals internal model isn't really designed to support enumerating
all of the output values for a particular module call, but our expression
evaluator currently depends on being able to do that and so we have a
temporary inefficient implementation of that which just scans the entire
table of values as a stopgap just to avoid this commit growing even larger
than it already is. In a future commit we'll rework the evaluator to
support the PartialEval mode and at the same time move the responsiblity
for enumerating all of the output values into the evaluator itself, since
it should be able to determine what it's expecting by analyzing the
configuration rather than just by trusting that earlier evaluation has
completed correctly.

Because our legacy state string serialization previously included output
values for all modules, some of our context tests were accidentally
depending on the implementation detail of how those got stored internally.
Those tests are updated here to test only the data that is a real part
of Terraform Core's result, by ensuring that the relevant data appears
somewhere either in a root output value or in a resource attribute.
2023-12-07 09:56:36 -08:00
hashicorp-copywrite[bot]
53c34ff49c
Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
James Bardin
cf5ebaf685 s/Schemas/ProviderSchema/ 2023-07-06 10:37:35 -04:00
James Bardin
36d34135ad replace remaining types in tests 2023-07-06 10:37:35 -04:00
hashicorp-copywrite[bot]
325d18262e [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
Liam Cervante
b5576159da
Migrate 'state show' command to new renderer (#33116)
* Migrate 'state show' command to new renderer

* handle error
2023-05-02 15:27:59 +02:00
Liam Cervante
d818d7850d
Structured Renderer: use the new renderer when rendering the state in addition to the plan (#32629)
* Use the new renderer when rendering the state

* remove confusing and unneeded comment
2023-02-07 09:14:14 +01:00