-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
configs: Error on invalid required_providers attrs #26184
Conversation
A few users have recently been confused about the purpose of the required_providers objects, adding provider configuration parameters in addition to version and source. This previously did not cause an error so would result in a confusingly distant failure. This commit adds a single diagnostic for any required_providers object which includes attributes other than version or source.
Codecov Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: would we refer to this as an "object" or is "block" more appropriate?
Good question! I looked into what language we use elsewhere, and I think object is the right choice here.
terraform/configs/provider_requirements.go Lines 132 to 137 in 898b459
The documentation also refers to the value as an object:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for grabbing this so quickly! ❤️ 🎉
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. |
A few users have recently been confused about the purpose of the
required_providers
objects, adding provider configuration parameters in addition toversion
andsource
. This previously did not cause an error so would result in a confusingly distant failure.This commit adds a single diagnostic for any
required_providers
object which includes attributes other thanversion
orsource
. Very open to suggestions on the diagnostic text!Fixes #26160
Screenshot