Repository navigation
use the same containment rules for concrete addresses (6/8) - #39353
Merged
Merged
Conversation
jbardin
force-pushed
the
jbardin/target-patterns-E
branch
from
October 8, 2026 15:47
3af93a7 to
1560520
Compare
Every Targetable address type now implements Contains with the same rules as target patterns. A concrete address only contains the instances it refers to, so a step without an instance key only contains the instance of a module call without count or for_each, rather than sometimes being treated as every instance. Containment is also consistent between address types, so a ModuleInstance can contain a ConfigAction, and AbsAction and AbsActionInstance only contain a ConfigAction when they select every instance of it, matching resources. Targets given by users are always patterns now, so the special cases which interpreted concrete addresses as targets are no longer needed. Nothing outside the package uses Targetable.AddrType any more, so AddrType and TargetableAddrType are removed. MoveEndpoint had borrowed TargetableAddrType to classify its endpoints, and now has its own private moveEndpointKind instead.
jbardin
force-pushed
the
jbardin/target-patterns-F
branch
from
October 8, 2026 15:56
cd2e048 to
321391d
Compare
jbardin
marked this pull request as ready for review
October 8, 2026 15:57
mildwonkey
previously approved these changes
Oct 8, 2026
mildwonkey
left a comment
Contributor
There was a problem hiding this comment.
oooh, this is a shiny one ✨
mildwonkey
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every Targetable address type now implements Contains with the same rules as target patterns. A concrete address only contains the instances it refers to, so a step without an instance key only contains the instance of a module call without count or for_each, rather than sometimes being treated as every instance. Containment is also consistent between address types, so a ModuleInstance can contain a ConfigAction, and AbsAction and AbsActionInstance only contain a ConfigAction when they select every instance of it, matching resources.
Targets given by users are always patterns now, so the special cases which interpreted concrete addresses as targets are no longer needed.
Nothing outside the package uses Targetable.AddrType any more, so AddrType and TargetableAddrType are removed. MoveEndpoint had borrowed TargetableAddrType to classify its endpoints, and now has its own private moveEndpointKind instead.