百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

tflint

> 数据库
开源

一个可插拔的 Terraform 代码检查工具

5.8K stars0 点赞1 次浏览
访问官网GitHub

工具介绍

一个可插拔的 Terraform 代码检查工具

TFLint

一个可插拔的 Terraform 代码检查工具

功能特性

TFLint 是一个框架,每项功能均由插件提供,其主要特性如下:

  • 为主流云服务提供商(AWS/Azure/GCP)查找可能的错误(例如无效的实例类型)。
  • 对已弃用的语法和未使用的声明发出警告。
  • 强制执行最佳实践和命名规范。

安装

从最新发布版本下载相应的归档文件,进行验证后安装二进制文件:

bash
curl -sSLO https://github.com/terraform-linters/tflint/releases/latest/download/tflint_linux_amd64.zip
curl -sSLO https://github.com/terraform-linters/tflint/releases/latest/download/checksums.txt
gh attestation verify checksums.txt -R terraform-linters/tflint
sha256sum --ignore-missing -c checksums.txt
unzip tflint_linux_amd64.zip
sudo install -c -v tflint /usr/local/bin/

Homebrew(macOS):

bash
brew install terraform-linters/tap/tflint

WinGet(Windows):

bash
winget install -e --id TerraformLinters.tflint

Go:

bash
go install github.com/terraform-linters/tflint@latest

验证

GitHub CLI(推荐)

bash
gh attestation verify checksums.txt -R terraform-linters/tflint
sha256sum --ignore-missing -c checksums.txt

Cosign(已弃用)

[!WARNING] Cosign 签名现已弃用。请使用 GitHub CLI。

bash
cosign verify-blob --certificate=checksums.txt.pem --signature=checksums.txt.keyless.sig --certificate-identity-regexp="^https://github.com/terraform-linters/tflint" --certificate-oidc-issuer=https://token.actions.githubusercontent.com checksums.txt
sha256sum --ignore-missing -c checksums.txt

Docker

除了直接安装之外,你还可以使用 Docker 镜像:

bash
Docker run --r

[Artifact Attestations](https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds) are available that can be verified using the GitHub CLI.
[Cosign](https://github.com/sigstore/cosign) `verify-blob` command ensures that the release was built with GitHub Actions in this repository.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Goterraformtflint

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库