{"id":13706937,"url":"https://github.com/devops-infra/action-tflint","last_synced_at":"2026-03-16T04:04:23.338Z","repository":{"id":38395846,"uuid":"252849568","full_name":"devops-infra/action-tflint","owner":"devops-infra","description":"GitHub Action that will run TFlint on Terraform files.","archived":false,"fork":false,"pushed_at":"2025-04-07T11:10:00.000Z","size":162,"stargazers_count":16,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T15:56:22.779Z","etag":null,"topics":["action-tflint","automation","christophshyper","ci-cd","cicd","devops","devops-workflow","docker","dockerhub","github-action","github-action-docker","github-actions","github-actions-docker","iaac","linter","terraform","terraform-modules","terraform-scripts","tflint"],"latest_commit_sha":null,"homepage":"https://christophshyper.github.io/","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devops-infra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-03T21:51:19.000Z","updated_at":"2025-04-07T11:10:02.000Z","dependencies_parsed_at":"2023-02-12T21:45:52.304Z","dependency_job_id":"a2cbbbb6-03a2-488f-8f9f-6d5406525da7","html_url":"https://github.com/devops-infra/action-tflint","commit_stats":{"total_commits":91,"total_committers":5,"mean_commits":18.2,"dds":0.6153846153846154,"last_synced_commit":"ad7d5e468b92f96553585c9f838d124652d762ae"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-infra%2Faction-tflint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-infra%2Faction-tflint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-infra%2Faction-tflint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-infra%2Faction-tflint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devops-infra","download_url":"https://codeload.github.com/devops-infra/action-tflint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248271921,"owners_count":21075800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action-tflint","automation","christophshyper","ci-cd","cicd","devops","devops-workflow","docker","dockerhub","github-action","github-action-docker","github-actions","github-actions-docker","iaac","linter","terraform","terraform-modules","terraform-scripts","tflint"],"created_at":"2024-08-02T22:01:13.021Z","updated_at":"2026-03-16T04:04:23.333Z","avatar_url":"https://github.com/devops-infra.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"readme":"# 🚀 GitHub Action linting Terraform files\n**GitHub Action that will run TFlint on Terraform files.**\n\n\n## 📦 Available on\n- **Docker Hub:** [devopsinfra/action-tflint:latest](https://hub.docker.com/repository/docker/devopsinfra/action-tflint)\n- **GitHub Packages:** [ghcr.io/devops-infra/action-tflint:latest](https://github.com/orgs/devops-infra/packages/container/package/action-tflint)\n\n\n## ✨ Features\n- Main use will be everywhere where [Terraform](https://github.com/hashicorp/terraform) is used and is great for statically or actively checking modules' sources.\n- Using [wata727](https://github.com/wata727)'s [TFLint](https://github.com/terraform-linters/tflint).\n\n\n## 📊 Badges\n[\n![GitHub repo](https://img.shields.io/badge/GitHub-devops--infra%2Faction--tflint-blueviolet.svg?style=plastic\u0026logo=github)\n![GitHub last commit](https://img.shields.io/github/last-commit/devops-infra/action-tflint?color=blueviolet\u0026logo=github\u0026style=plastic\u0026label=Last%20commit)\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/devops-infra/action-tflint?color=blueviolet\u0026label=Code%20size\u0026style=plastic\u0026logo=github)\n![GitHub license](https://img.shields.io/github/license/devops-infra/action-tflint?color=blueviolet\u0026logo=github\u0026style=plastic\u0026label=License)\n](https://github.com/devops-infra/action-tflint \"shields.io\")\n\u003cbr\u003e\n[\n![DockerHub](https://img.shields.io/badge/DockerHub-devopsinfra%2Faction--tflint-blue.svg?style=plastic\u0026logo=docker)\n![Docker version](https://img.shields.io/docker/v/devopsinfra/action-tflint?color=blue\u0026label=Version\u0026logo=docker\u0026style=plastic\u0026sort=semver)\n![Image size](https://img.shields.io/docker/image-size/devopsinfra/action-tflint/latest?label=Image%20size\u0026style=plastic\u0026logo=docker)\n![Docker Pulls](https://img.shields.io/docker/pulls/devopsinfra/action-tflint?color=blue\u0026label=Pulls\u0026logo=docker\u0026style=plastic)\n](https://hub.docker.com/r/devopsinfra/action-tflint \"shields.io\")\n\n\n## 🏷️ Version Tags: vX, vX.Y, vX.Y.Z\nThis action supports three tag levels for flexible versioning:\n- `vX`: latest patch of the major version (e.g., `v1`).\n- `vX.Y`: latest patch of the minor version (e.g., `v1.2`).\n- `vX.Y.Z`: fixed to a specific release (e.g., `v1.2.3`).\n\n\n## 📖 API Reference\n```yaml\n    - name: Run the Action\n      uses: devops-infra/action-tflint@v1.0.0\n      with:\n        dir_filter: modules\n```\n\n\n### 🔧 Input Parameters\n| Input Variable    | Required | Default       | Description                                                                                                |\n|-------------------|----------|---------------|------------------------------------------------------------------------------------------------------------|\n| `dir_filter`      | No       | `*`           | Prefixes or sub-directories to search for Terraform modules. Use comma as separator.                       |\n| `fail_on_changes` | No       | `true`        | Whether TFLint should fail whole action.                                                                   |\n| `tflint_config`   | No       | `.tflint.hcl` | Location from repository root to TFLint config file. Disables `tflint_params`.                             |\n| `tflint_params`   | No       | ``            | Parameters passed to TFLint binary. See [TFLint](https://github.com/terraform-linters/tflint) for details. |\n| `run_init`        | No       | `true`        | Whether the action should run `terraform init`. Defaults to true.                                          |\n\n\n## 💻 Usage Examples\n\n### 📝 Basic Example\nBy default fail if lint errors found in any subdirectory. Run the Action via GitHub.\n```yaml\nname: Check TFLint\non:\n  push:\n    branches:\n      - \"**\"\njobs:\n  format-hcl:\n    runs-on: ubuntu-latest\n    steps:\n    - name: Checkout\n      uses: actions/checkout@v5\n\n    - name: Check linting of Terraform files\n      uses: devops-infra/action-tflint@v1.0.0\n```\n\n### 🔀 Advanced Example\nUse different location for TFLint config file and parse only `aws*` and `gcp*` modules in `modules/` directory. Run the Action via GitHub.\n```yaml\nname: Check TFLint with custom config\non:\n  push:\n    branches:\n      - \"**\"\njobs:\n  format-hcl:\n    runs-on: ubuntu-latest\n    steps:\n    - name: Checkout\n      uses: actions/checkout@v5\n\n    - name: Check linting of Terraform modules\n      uses: devops-infra/action-tflint@v1.0.0\n      with:\n        tflint_config: modules/.tflint.hcl\n        dir_filter: modules/aws,modules/gcp\n```\n\n### 🔀 Advanced Example\nUse deep check (need cloud credentials) and treat all directories under `modules` as Terraform modules. Run the Action via DockerHub.\n```yaml\nname: Check TFLint with custom config\non:\n  push:\n    branches:\n      - \"**\"\njobs:\n  format-hcl:\n    runs-on: ubuntu-latest\n    steps:\n    - name: Checkout\n      uses: actions/checkout@v5\n\n    - name: Check linting of Terraform modules\n      uses: devops-infra/action-tflint@v1.0.0\n      with:\n        tflint_params: \"--module --deep\"\n        dir_filter: modules\n```\n\n\n## 🤝 Contributing\nContributions are welcome! See [CONTRIBUTING](https://github.com/devops-infra/.github/blob/master/CONTRIBUTING.md).\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n\n## 📄 License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n\n## 💬 Support\nIf you have any questions or need help, please:\n- 📝 Create an [issue](https://github.com/devops-infra/action-tflint/issues)\n- 🌟 Star this repository if you find it useful!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevops-infra%2Faction-tflint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevops-infra%2Faction-tflint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevops-infra%2Faction-tflint/lists"}