vscode-terraform
vscode-terraform copied to clipboard
Install/upgrade provider via code lens
Problem Statement
Terraform users can declare a provider version constraint via the version
argument within required_providers
entry. For example:
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3"
}
}
}
User can install the latest provider versions via terraform init
or upgrade to the latest versions via terraform init [-get=false] -upgrade=true
.
Often times (esp. when they're just consumers but not maintainers of the upstream provider) they may not be aware that new version of a provider was released.
Users would benefit from knowing that the provider they're looking at is upgradable and from being able to upgrade it directly from the IDE.
Expected User Experience
The UI is expected to leverage the native code lens feature of VS Code in a similar way to gopls & VS Code Go extension:
Proposal
- TODO: create issue in core for targeting provider for upgrade/installation
- https://github.com/hashicorp/terraform-ls/issues/299