Conversation
6b45389 to
813f9e4
Compare
dsa0x
approved these changes
Feb 20, 2025
SarahFrench
reviewed
Feb 20, 2025
11edf7b to
5df379b
Compare
Allow for more precise types to be used when evaluating unknown output values. If we know all the types of outputs, and there are no dynamic types involved, we can use lists and maps for the modules, which allows module values to better match between validation and plan/apply. We also fix an old problem of modules evaluating to lists and maps during validation but not plan/apply, and causing expressions to evaluate differently in different phases. We use the existence of a type declaration to opt-in to this very subtly different behavior. It's not expected that any config would notice the difference since we are only removing possible type mismatches.
jbardin
approved these changes
Mar 16, 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.
This PR introduces support for declaring explicit type constraints in output blocks. It picks up the work that Martin did some time ago in #31728.
We could also introduce this as an experiment, available only in alpha releases, if we want to learn if a new argument inside the output block is the most ideal design for it.
UX
Constraint mismatches are raised as an error
Fixes #
Target Release
1.15.x
CHANGELOG entry