Skip to content

Don't evaluate providers within overridden modules#35110

Merged
jbardin merged 1 commit intomainfrom
jbardin/module-override-legacy-provider
May 6, 2024
Merged

Don't evaluate providers within overridden modules#35110
jbardin merged 1 commit intomainfrom
jbardin/module-override-legacy-provider

Conversation

@jbardin
Copy link
Copy Markdown
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 a team and liamcervante 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
@jbardin jbardin deleted the jbardin/module-override-legacy-provider branch May 6, 2024 20:19
@github-actions
Copy link
Copy Markdown
Contributor

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
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 6, 2024

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 Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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