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

Don't evaluate providers within overridden modules #35110

Merged
merged 1 commit into from May 6, 2024

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented May 2, 2024

While we don't normally encounter providers within modules, they are technically still supported, and could exist within a module which has been overridden for testing. Since the module is not being evaluated overall, we cannot safely evaluate the provider config.

The override is handled similarly to the resource overrides during the graph walk. We can more easily handle the override logic in the same location, without having to pipe the information through multiple graph builders and transformers to store in the provider nodes themselves.

Fixes #35097

While we don't normally encounter providers within modules, they are
technically still supported, and could exist within a module which has
been overridden for testing. Since the module is not being evaluated, we
cannot safely evaluate the provider config as variables will not exist
within that module.
@jbardin jbardin requested review from liamcervante and a team May 2, 2024 19:40
@jbardin jbardin added the 1.8-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label May 6, 2024
@jbardin jbardin merged commit e08b269 into main May 6, 2024
6 checks passed
@jbardin jbardin deleted the jbardin/module-override-legacy-provider branch May 6, 2024 20:19
Copy link

github-actions bot commented May 6, 2024

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@jbardin jbardin restored the jbardin/module-override-legacy-provider branch May 6, 2024 20:22
@jbardin jbardin deleted the jbardin/module-override-legacy-provider branch May 6, 2024 20:32
jbardin added a commit that referenced this pull request May 6, 2024
Backport #35110: Don't evaluate providers within overridden modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.8-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic: value for "variable" was requested before it was provided
2 participants