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

Support Terraform 0.11 module sources #167

Closed
brainsik opened this issue Jan 24, 2018 · 5 comments
Closed

Support Terraform 0.11 module sources #167

brainsik opened this issue Jan 24, 2018 · 5 comments
Milestone

Comments

@brainsik
Copy link

Terraform 0.11 introduced support for module installation from Terraform Registry. As a consequence, module source strings using relative paths must be expressed explicitly by beginning the string with ./ or ../. See Relative Paths in Module source.

tflint is using the old interpretation of module source:

$ tflint --version
TFLint version 0.5.4
$ tflint 
ERROR: module `terraform-aws-modules/vpc/aws` not found. Did you run `terraform get`?
@davewongillies
Copy link
Contributor

I'm hitting on this issue too when using the Terraform Enterprise private module registry:

$ tflint
ERROR: module `app.terraform.io/my-org/my-provider/my-module` not found. Did you run `terraform get`?

@wata727
Copy link
Member

wata727 commented Apr 28, 2018

Currently, TFLint's module resolver is incomplete. Until now applied a partial patch from Terraform's implementation, but it seems that there was a big change in 0.11.

In the future, I plan to solve this problem by using Terraform's module resolver. However, It is necessary to wait for new Terraform version.

@davewongillies
Copy link
Contributor

davewongillies commented Apr 28, 2018

For those looking for a workaround, I'm making use of tflint's --ignore-module option, which can also be set in .tflint.hcl

.tflint.hcl:

config {
  ignore_module = {
    "app.terraform.io/my-org/my-provider/my-module" = true
  }
}

@rbtcollins
Copy link

The config example from @davewongilies is corrupt it is missing the closing }.

@wata727
Copy link
Member

wata727 commented May 25, 2019

Hi there, I just released TFLint v0.8.0 that supports v0.11 and v0.12 modules. Please try the latest version again. If you still have problems, please open a new issue instead of reopening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants