Closed
Description
Problem Statement
Users don't always use a single Terraform version when they manage multiple codebases. Many of them upgrade when it's convenient or necessary.
Users would therefore benefit from knowing the requirements of the module they're working with and the Terraform that was discovered as installed (and would be used for fmt
or validate
).
Expected User Experience
Proposal
- Introduce
module.terraform
command to expose details about Terraform installation terraform-ls#995 - Extension to run that custom command to obtain TF version & constraint after change
Outstanding questions
- How to keep TF version up to date on LS side - see Detect and re-load terraform version & path change terraform-ls#69
- See also client/executeCommand microsoft/language-server-protocol#1119 which would likely help updating the UI from server-side, instead of client constantly asking on every change
We could ship an MVP which only displays the constraint as that would only change with configuration change.