Skip to content

Commit

Permalink
Remove inspect-module command (hashicorp#1642)
Browse files Browse the repository at this point in the history
* Remove inspect module command

* Remove outdated troubleshooting docs
  • Loading branch information
dbanck authored Feb 22, 2024
1 parent 6518ef9 commit 9764b1e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 257 deletions.
29 changes: 0 additions & 29 deletions docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,32 +184,3 @@ Path supports template syntax. This allows for separation of logs while accounti
- `ppid` - parent process ID (typically editor's or editor plugin's PID)

The path is interpreted as [Go template](https://golang.org/pkg/text/template/), e.g. `/tmp/terraform-ls-memprofile-{{timestamp}}.log`.

## "No root module found for ... functionality may be limited"

Most of the language server features depend on initialized root modules
(i.e. folder with `*.tf` files where you ran `terraform init` successfully).
and server's ability to discover them within the hierarchy and match them
with files being open in the editor.

This functionality should cover many hierarchies, but it may not cover yours.
If it appears that root modules aren't being discovered or matched the way
they should be, it can be useful to use `inspect-module` to obtain
the discovery results and provide them to maintainers in a bug report.

Point it to the same directory that you tried to open in your IDE/editor
and wait for the output - it may take some seconds or low minutes
depending on the complexity of your hierarchy and number of root modules in it.

```
$ terraform-ls inspect-module /path/to/dir
```

## "Unable to retrieve schemas for ..."

The process of obtaining the schema currently requires access to the state,
which in turn means that if the code itself doesn't have enough context
to obtain the state and/or there isn't context available from config file(s)
in standard locations you may need to provide that extra context.

See https://github.com/hashicorp/terraform-ls/issues/128 for more.
223 changes: 0 additions & 223 deletions internal/cmd/inspect_module_command.go

This file was deleted.

5 changes: 0 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ func main() {
AlgoliaAPIKey: algoliaAPIKey,
}, nil
},
"inspect-module": func() (cli.Command, error) {
return &cmd.InspectModuleCommand{
Ui: ui,
}, nil
},
"version": func() (cli.Command, error) {
return &cmd.VersionCommand{
Ui: ui,
Expand Down

0 comments on commit 9764b1e

Please sign in to comment.