Skip to content

Stevenmasley/chaining - #164

Closed
Emyrk wants to merge 2 commits into
mainfrom
stevenmasley/chaining
Closed

Stevenmasley/chaining#164
Emyrk wants to merge 2 commits into
mainfrom
stevenmasley/chaining

Conversation

@Emyrk

@Emyrk Emyrk commented Jul 3, 2025

Copy link
Copy Markdown
Member

No description provided.

Emyrk added a commit that referenced this pull request Sep 10, 2026
Revives the chain fixture from #164. The first hop (a parameter
count-gated on another's value) works. The second hop, count-gated on a
count-gated parameter's value via [0], does not: the count is evaluated
before the input flows in and expansion is not revisited, so cpu_cores is
dropped. The vector pins that and documents how to flip it once fixed.
@Emyrk Emyrk closed this Sep 10, 2026
Emyrk added a commit that referenced this pull request Sep 10, 2026
…223)

Pins the parameter, preset, and tag values that flow from `resource`
blocks, ahead of #221 (which evaluates only the parameter/preset/tag
closure via coder/trivy#74). Everything passes on `main`, where nothing
is pruned, so a failure after rebasing #221 means pruning dropped a
resource a target depends on.

- `testdata/resourceclosure`: the fixture from #221 plus conditional,
`try()`, expression index, `option` and `dynamic "option"` blocks,
`count` on a target, a data-source intermediary, tag -> resource ->
parameter, preset `prebuilds`, and a local module.
- `testdata/resourceclosurejson`: a `.tf.json` template with two
resources in one expression. This currently fails against the #221 pin
(second resource pruned, default unknown); see the [comment on
coder/trivy#74](coder/trivy#74 (comment)).

- `testdata/diskaccess`: revives #85. `file()` on an in-tree path is
read; a path escaping the template root is unknown and flags the option
as invalid. Not closure-related, but a cheap guard that resource pruning
does not disturb function evaluation against the template fs.

- `testdata/chain`: revives #164. Pins two-hop count chaining: a
parameter count-gated on a count-gated parameter's `[0].value` is
silently dropped today because its count is evaluated before the input
flows in. The vector asserts current behavior and the comment says how
to flip it once fixed.

Prepared with Coder Agents assistance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant