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 Give suggestions & remind users to use required_providers when provider not in registry into v0.15 #28054

Merged

Conversation

teamterraform
Copy link
Contributor

Backport

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

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


When a user has any module, or child module, that has a ErrRegistryProviderNotKnown error, users are often confused why they don't get inheritance from other modules.

Because Terraform explicitly loads modules as units with their own provider requirements (required_providers), and adds a suggestion of a provider "did you mean" if they have a provider of the same type (but not the default namespace) in their requirements.

This is what the new suggestion looks like in practice (with suggestion):

Screen Shot 2021-03-10 at 11 09 08 AM

This is what the new suggestion looks like in practice (without suggestion/no existing provider requirements):

Screen Shot 2021-03-08 at 3 12 47 PM

Open to comments on improving this suggestion to be more user-friendly (for lack of a better term)

My hope is that this can address the (very valid!) concerns and comments surrounding issues like #27920 and #27701 . In #27920, Martin suggests an improvement where we could suggest a similar-name provider we may know about, but because of how the code is currently structured, I don't have confidence in picking an accurate (successful) name, so I am suggesting a more general suggestion here.

Fixes #27920
Fixes #27701

@teamterraform teamterraform force-pushed the backport/pselle/provider-installer-help/basically-curious-bug branch from 1750fc8 to 0db3297 Compare March 11, 2021 13:54
@pselle pselle merged commit 1b1af1d into v0.15 Mar 11, 2021
@pselle pselle deleted the backport/pselle/provider-installer-help/basically-curious-bug branch March 11, 2021 13:56
@ghost
Copy link

ghost commented Apr 11, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 11, 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.

None yet

2 participants