Commit graph

12 commits

Author SHA1 Message Date
Radek Simko
0fe906fa8c make copyrightfix 2026-02-17 13:56:34 +00:00
Daniel Schmidt
ad4371342f track partial expanded action invocations through deferred action invocation
like we do it for resources just simpler because we don't have layered addrs maps
2025-09-02 13:04:48 +02:00
Daniel Schmidt
dffeeec81e partially expand triggers as well 2025-09-02 13:04:48 +02:00
Daniel Schmidt
29b2ab15e2 support partial expansion in actions 2025-09-02 13:04:48 +02:00
Liam Cervante
55600d815e
Add support for partial addresses and targets that start with 'resource.' (#35333)
* Add support for partial addresses and targets that start with 'resource.'

* fix broken tests
2024-06-14 09:58:53 +02:00
Liam Cervante
5172cb5e27
deferred actions: allow unknown foreach attributes within import blocks (#35311)
* deferred actions: allow unknown foreach attributes within import blocks

* remember to fail tests when diags returned
2024-06-12 13:14:40 +02:00
Liam Cervante
765ec6e923
Complete implementation of targeting with deferred resources (#34971) 2024-04-11 08:45:03 +02:00
Liam Cervante
28797e7938
Add the deferred changes into the plan (#34946)
* Add the deferred changes into the plan

* add copywrite headers
2024-04-05 10:34:10 +02:00
Martin Atkins
8e02f5dd21 addrs: PartialExpandedResource module address accessors
This is kinda awkward because this address type represents both resources
whose own instances are not expanded yet and resources belonging to whole
modules whose instance keys haven't been expanded yet, and those two cases
have different address types.

However, in return for this awkward API only for the rare case where we
need to isolate the module instance address, the rest of the system gets
to not worry very much about this distinction: it can share most code
between the two cases, since they both need similar evaluation treatment
anyway.
2024-02-12 12:13:08 -08:00
Martin Atkins
869750da61 namedvals: A new package to encapsulate the tracking of named values
Currently we have a slightly different treatment for each of the different
kinds of named values, which makes it hard to generalize the
implementations of their very similar behaviors.

This package should over time take ownership of the problem of tracking
all three kinds of named value during a graph walk, with result data
structures that use this information (such as state and plan objects)
copying the relevant values out of here only once the graph walk is
complete.

Nothing is using this yet, though. Some retrofitting of this into
Terraform Core will follow in subsequent commits.
2023-11-29 08:41:40 -08:00
Martin Atkins
908c5fa44f addrs: PartialExpandedModule.String correct for entirely-unexpanded
This logic was previously incorrect for any case where the number of
expanded steps was zero, causing the string representation to begin with
a dot when it ought not to.
2023-11-29 08:41:40 -08:00
Martin Atkins
4d0087e3ef addrs: PartialExpandedModule and PartialExpandedResource
In preparation for making it not an error to have unknown values in count
or for_each arguments, we will need a way to talk about the
as-yet-undetermined set of module or resource instance addresses that
will result once we _do_ learn the instance keys in a later step.

Unlike many of our address types these have unexported internals so that
we can do some semi-uncool things with our address types that external
callers are not normally supposed to do. This means they therefore need
a bunch more methods than our address types typically need so that it's
possible to access the relevant parts of the internal representation.
2023-11-28 10:11:54 -08:00