Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should work when using multiple children projects #417

Closed
Sytten opened this issue Jun 24, 2020 · 7 comments
Closed

Should work when using multiple children projects #417

Sytten opened this issue Jun 24, 2020 · 7 comments

Comments

@Sytten
Copy link

Sytten commented Jun 24, 2020

Before this update, I was able to managed all my projects even if I opened a parent folder containing multiple projects, now it just fails to init with the message Workspace not initialized. Please run terraform init.
It is very common to have a lot of projects in a decent architecture, something like:

aws/
├── modules/
│   ├── service/
├── projects/
│   ├── dns/
│   └── cluster/

Or even something like

aws/
├── modules/
│   ├── service/
├── projects/
│   ├── dev/
│   └── prod/
@radeksimko radeksimko added bug Something isn't working and removed bug Something isn't working labels Jun 26, 2020
@radeksimko
Copy link
Member

Hi @Sytten
Have you tried the extension with the last updated version of the language server (v0.4.0, published yesterday)?

The new version will walk through the hierarchy of directory opened in VSCode and attempt to add any initialized root modules (any directories which have been terraform init'd). See the full changelog.

VSCode should prompt you for the update on a fresh launch, or you can just try restarting it.

@paultyng
Copy link
Contributor

We are also adding support for manual specification of root module folders as a workaround while discovery is improved on the LS, you can track that in #396. If your structure isn't covered in 0.4.0 as suggested by Radek above, you can track improvements in the LS for different folder structures in hashicorp/terraform-ls#32

@bradennapier
Copy link

We are also adding support for manual specification of root module folders as a workaround while discovery is improved on the LS, you can track that in #396. If your structure isn't covered in 0.4.0 as suggested by Radek above, you can track improvements in the LS for different folder structures in hashicorp/terraform-ls#32

The feature rootModules is basically useless in most cases. generally if you need to define that many paths you want to do relative paths not absolute paths... you can get the project directory easily enough so that should be the relative base so that the settings do not need to be made for every user independently and can instead just be added once in a project-local .vscode/settings.json

@ghost ghost removed the waiting-response label Jul 16, 2020
@radeksimko
Copy link
Member

Relative paths are tracked under hashicorp/terraform-ls#235 - that is something we will ship independently of the extension's release cycle.

@Sytten
Copy link
Author

Sytten commented Sep 22, 2020

I think this is fixed now, unless somebody has a particular usecase that doesnt work I propose we close the issue

@aeschright
Copy link
Contributor

Since there are no further comments, I'll close it. Please open a new issue if needed.

@ghost
Copy link

ghost commented Jan 18, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the context necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants