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

Rule runs on everything when it should not. #226

Open
ekristen opened this issue Feb 21, 2022 · 0 comments
Open

Rule runs on everything when it should not. #226

ekristen opened this issue Feb 21, 2022 · 0 comments

Comments

@ekristen
Copy link

Taken from the docs, when run in verbose mode, this appears to run on ever single resource when it should only run against variables. The same happens when category is module, data, and resource.

---
version: 1
description: Make sure Terraform top level blocks follow best practices.
type: Terraform
files:
  - "*.tf"
rules:
  - id: TF_VARIABLE_NAMING_CONVENTION
    message: "Terraform variable block name should match the naming convention. Name should be: not more 64 chars, starts with letter, doesn't have dash, and ends with letter or number"
    severity: FAILURE
    category: variable
    assertions:
      - key: __name__
        op: regex
        value: "^[a-z][a-z0-9_]{0,62}[a-z0-9]$"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant