New Code Action: Generate missing required_providers
entry
#480
Labels
enhancement
New feature or request
providers
Functionality related to Terraform providers
textDocument/codeAction
textDocument/publishDiagnostics
Current Version
Background
Many users still doesn't seem to use the explicit provider specification via
required_providers
block, e.g.This means LS needs to handle certain edge cases related to "legacy" provider addresses:
Use-cases
Users would benefit from:
Attempted Solutions
Point users to documentation, such as https://www.terraform.io/docs/language/providers/requirements.html
Proposal
Help users follow best practice by detecting lack of provider requirements in configuration and offering them to generate the requirements via code action or code lense (not sure what's more appropriate) if they use Terraform 0.13+.
We could also publish diagnostics about this.
The text was updated successfully, but these errors were encountered: