Open gmconte opened 2 years ago
Having this same issue on Terraform 1.1.2.
Same issue with Terraform 1.1.*. I have temporarily reverted to terraform 1.0.11
Same here, downgrade works. You can accept the suggested action, it will create .terraform/modules
, the warning disappears and autocomplete works. But it would be much nicer if the plugin would be just detect .terraform/modules
in the project root. Now all my submodules have a .terraform
directory.
The format of the Source attribute for Git-URLs has changed too:
modules.json from Terraform v0.15
...
"Source": "git::git@bitbucket.org:sample/url.git?ref=v1.0",
...
modules.json from Terraform v1.1.3
...
"Source": "git::ssh://git@bitbucket.org/sample/url.git?ref=v1.0",
...
YouTrack ticket just for reference.
https://youtrack.jetbrains.com/issue/IDEA-287371
1.0.11
works as a workaround too thanks to Daniel Hajduk.https://youtrack.jetbrains.com/issue/IDEA-287371#focus=Comments-27-5743872.0-0
same issue Goland Build #GO-221.5080.224 and Terraform v1.1.8
@VladRassokhin - Can this be prioritised please? 4+ months for this is kind of ridiculous
From the example above, this works for me as workaround - it seems Terraform is being explicit about the registry source now when its implied in the HCL.
module "my_module" {
source = "terraform-aws-modules/vpc/aws"
}
works fine when set as
module "my_module" {
source = "registry.terraform.io/terraform-aws-modules/vpc/aws"
}
Seems fixed in latest version
Yes, this issue is fixed in latest IDE versions. Please refer https://youtrack.jetbrains.com/issue/IDEA-287371. @gmconte May be this issue can be closed.
I'm still seeing this issue with Terraform 1.3.7
Since I upgraded from Terraform v1.0.10 to v1.1.3 I found that the plugin is unable to find the standard terraform registry modules, hence the autosuggest doesn't work anymore
I believe that this is due to a change in the modules.json generated, causing the plugin to fail the match between the
Source
value in the code with theSource
value in the json file.The observed change in modules.json is the following:
modules.json from Terraform v1.0.10
modules.json from Terraform v1.1.3
As a workaround, I had to modify all my modules to point to the same full path
registry.terraform.io/terraform-aws-modules/xxx
which is not ideal, but at least I can work with itPrerequisites
Installation details
terraform -v
)Expected Behavior
The plugin doesn't show any warnings
Actual Behavior
The plugin shows a warning "Cannot locate module locally: Unknown reason" and the auto-complete doesn't work
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform init -upgrade
to refresh the modules.json file