vscode-terraform icon indicating copy to clipboard operation
vscode-terraform copied to clipboard

Install/upgrade provider via code lens

Open radeksimko opened this issue 3 years ago • 0 comments

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:

Screenshot 2021-06-21 at 15 44 52

Proposal

  • TODO: create issue in core for targeting provider for upgrade/installation
  • https://github.com/hashicorp/terraform-ls/issues/299

radeksimko avatar Jun 21 '21 14:06 radeksimko