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

providers: ignore "constraint providers" #58

Merged
merged 1 commit into from
Sep 2, 2021
Merged

providers: ignore "constraint providers" #58

merged 1 commit into from
Sep 2, 2021

Conversation

xlr-8
Copy link
Contributor

@xlr-8 xlr-8 commented Sep 2, 2021

Certain providers of Terraform are meant to specify constraint rather
than locations/regions, etc. In cases where a provider doesn't contain a
valid location, it will not be added to the list of valid providers, if
no providers at all exist an error will be returned mentioning it.

@xlr-8 xlr-8 self-assigned this Sep 2, 2021
Comment on lines +82 to +78
if prov != nil {
providers[name] = prov
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better maybe for this function to check?

if len(providers) == 0 {
		return nil, ErrNoProviders
	}

So then it's centralized

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be done at the end eventually yeah

@xlr-8 xlr-8 force-pushed the hr-3070 branch 2 times, most recently from 79bfd0a to d0efbc6 Compare September 2, 2021 16:33
Certain providers of Terraform are meant to specify constraint rather
than locations/regions, etc. In cases where a provider doesn't contain a
valid location, it will not be added to the list of valid providers, if
no providers at all exist an error will be returned mentioning it.
@xlr-8 xlr-8 merged commit 4e412fe into master Sep 2, 2021
@xescugc xescugc deleted the hr-3070 branch September 3, 2021 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants