Skip to content

Can't use arguments for module inspection #76

@jreisserVeoL

Description

@jreisserVeoL

Hello!

I'm not sure why but I can't add arguments to terraform_tflint hook. I'm trying to use tflint --module or any argument but I always get the following error message:

getopt: unrecognize option '--module'

Project structures

I'm using official terraform modules which are located in the .terraform file and custom modules.

.
├── .terraform
├── .pre-commit-config.yaml
├── main.tf
├── variables.tf
└── outputs.tf

or

.
├── custom_module
│   ├── main.tf
│   ├── outputs.tf
│   └── variables.tf
│
├── .terraform
├── .pre-commit-config.yaml
├── main.tf
├── outputs.tf
└── variables.tf

pre-commit-config.yaml just contains the following hooks :

- repo: git://github.com/antonbabenko/pre-commit-terraform
  rev: v1.21.0
  hooks:
    - id: terraform_tflint
      args: ['--module']

I use TFLint version 0.13.1, pre-commit 1.20.0 and pre-commit-terraform v1.21.0. pre-commit is up to date.

Is there something I'm missing ? If you have any suggestion or workaround to help us with this problem, I'd greatly appreciate it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions