Skip to content

Conversation

lbodor
Copy link

@lbodor lbodor commented Jul 15, 2024

  • Call tflint on all arguments, rather than just the first
  • Rename tflint wrapper to terraform_lint and add tflint to extraPackages
  • Drop support fortflint < 0.45.0, not packaged in NixOS since nixos-22.11

Would it be better to use entry instead of a wrapper?

Sample output

terraform-lint...........................................................Failed
- hook id: terraform-lint
- exit code: 1

components/aws-js-s3-explorer/main.tf 1 issue(s) found:

Warning: Missing version constraint for provider "aws" in `required_providers` (terraform_required_providers)

  on components/aws-js-s3-explorer/main.tf line 6:
   6: resource "aws_s3_object" "index_html" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.7.0/docs/rules/terraform_required_providers.md

components/gnss-eks/modules/argo-workflows/argo-workflows.tf 4 issue(s) found:

Warning: Missing version constraint for provider "template" in `required_providers` (terraform_required_providers)

  on components/gnss-eks/modules/argo-workflows/argo-workflows.tf line 9:
   9: data "template_file" "server_config" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.7.0/docs/rules/terraform_required_providers.md

Warning: Missing version constraint for provider "random" in `required_providers` (terraform_required_providers)

  on components/gnss-eks/modules/argo-workflows/argo-workflows.tf line 70:
  70: resource "random_password" "db_user" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.7.0/docs/rules/terraform_required_providers.md

Warning: Missing version constraint for provider "aws" in `required_providers` (terraform_required_providers)

  on components/gnss-eks/modules/argo-workflows/argo-workflows.tf line 91:
  91: resource "aws_s3_bucket" "artifact_repository" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.7.0/docs/rules/terraform_required_providers.md

Warning: Missing version constraint for provider "kubernetes" in `required_providers` (terraform_required_providers)

  on components/gnss-eks/modules/argo-workflows/argo-workflows.tf line 129:
 129: resource "kubernetes_secret" "artifact_repository_user_creds" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.7.0/docs/rules/terraform_required_providers.md

[INFO] Restored changes from /home/lbodor/.cache/pre-commit/patch1721082677-427193.

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

Successfully merging this pull request may close these issues.

1 participant