hashicorp / vscode-terraform

HashiCorp Terraform VSCode extension
https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform
Mozilla Public License 2.0
929 stars 180 forks source link

Show current TF workspace in status bar #358

Open paultyng opened 4 years ago

danieldreier commented 3 years ago

This is closely related to https://github.com/hashicorp/vscode-terraform/issues/357

jakefurlong commented 2 years ago

Has there been any progress made on this? If not I'm going to start developing an extension

jpogran commented 2 years ago

Hi @jakefurlong, thanks for upvoting this! We currently have https://github.com/hashicorp/vscode-terraform/pull/1050 that is adding functionality to uplift more environmental information where things like this can land, but we are waiting to raise the minimum version of VS Code before we do so. Once we raise that, we can start to add more things like this.

If you want to make your own extension still, we can work together on how the two can interoperate.

konopkap commented 1 year ago

Hi @jakefurlong, thanks for upvoting this! We currently have #1050 that is adding functionality to uplift more environmental information where things like this can land, but we are waiting to raise the minimum version of VS Code before we do so. Once we raise that, we can start to add more things like this.

If you want to make your own extension still, we can work together on how the two can interoperate.

Any update there? #1050 is closed as incomplete

orgads commented 1 year ago

@jpogran Why did you close #1050?

Edit: Looks like it was superseded by #1547.

So is it possible to make progress here?

jpogran commented 1 year ago

Hello all,

I implemented a language status indicator in https://github.com/hashicorp/vscode-terraform/pull/1547, which shows the version of terraform-ls, the version of Terraform required and the detected version of Terraform for the open file.

This ticket was created quite some time ago without much information, so I will work to update it so it can get properly planned. To confirm the intention of the request, this is to display the selected Terraform CLI workspace for the open file in a statusbar item. This is not a ticket to show what Terraform Cloud workspace is configured for the open folder.

From a design standpoint I have some questions. Since it is common to open multiple folders with Terraform configurations inside them or to open a VS Code Workspaces with more than one folder with Terraform configurations, how should we handle multiple Terraform CLI workspaces? A single statusbar item would not be able to reflect more than one Terraform CLI workspace effectively. Should we only show the Terraform CLI workspace for the open file? Should we do a treeview instead with a list of folders and the selected Terraform Workspace? Is there another method you would prefer?

I'll work on updating the description as a design is pinned down.

orgads commented 1 year ago

Thank you.

In my project, the workspace I care about the most is in the project root directory. Notice that when working with noodles, it doesn't make much sense to show the workspace of the current open file when this file is in a module.

I do have a subproject in a directory, which is not a module, but I'm perfectly fine with having only the root.