Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of generate precise resource types during validate into v1.1 #29873

Merged

Conversation

teamterraform
Copy link
Contributor

Backport

This PR is auto-generated from #29862 to be assessed for backporting due to the inclusion of the label 1.1-backport.

The below text is copied from the body of the original PR.


Allow GetResource to return correctly typed values during validation, rather than relying on cty.DynamicVal as a placeholder. This allows other dependent expressions to be more correctly evaluated.

There is no reason we must use the stored state to find the provider address for evaluation. We don't need the exact provider instance here, since we are only looking for the schema and the schema lookup is done with a simple provider type.

Once we have the resource type, we can return correctly shaped unknown values for validation based on the expansion mode of the resource configuration.

Fixes the specific case shown in #29809

@teamterraform teamterraform force-pushed the backport/jbardin/validate-resource-values/closely-caring-vulture branch from e6f3bbe to c59da67 Compare November 3, 2021 12:59
@jbardin jbardin merged commit 4641cb0 into v1.1 Nov 3, 2021
@jbardin jbardin deleted the backport/jbardin/validate-resource-values/closely-caring-vulture branch November 3, 2021 13:11
@github-actions
Copy link

github-actions bot commented Dec 4, 2021

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants