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: deprecate version argument inside provider configuration blocks #26135
configs: deprecate version argument inside provider configuration blocks #26135
Conversation
The version argument is deprecated in Terraform v0.14 in favor of required_providers and will be removed in a future version of terraform (expected to be v0.15). The provider configuration documentation already discourages use of 'version' inside provider configuration blocks, so it only needed an extra note that it is actively deprecated.
@@ -83,13 +83,12 @@ func testNestedModuleConfigFromDir(t *testing.T, path string) (*Config, hcl.Diag | |||
|
|||
parser := NewParser(nil) | |||
mod, diags := parser.LoadConfigDir(path) | |||
assertNoDiagnostics(t, diags) |
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.
This is a little odd: It doesn't really make sense for a helper to call another helper, or to bail out early instead of letting the caller decide what to do with diagnostics.
There are also only 2 tests using this code, which I eyeballed, and I think I wrote this anyway so it was probably a thoughtless copy-pasta.
(fixing failing test now) |
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.
🎉
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. |
The version argument is deprecated in Terraform v0.14 in favor of
required_providers and will be removed in a future version of terraform
(expected to be v0.15). The provider configuration documentation already
discourages use of 'version' inside provider configuration blocks, so it
only needed an extra note that it is actively deprecated.
I took advantage of an existing test, TestProviderReservedNames in provider_test.go, to verify the diagnostic, instead of writing a test just for this. That felt ok to do since we'll be removing it all in v0.15 (probably).