terraform 几个方便的工具

几个方便的terraform 工具,方便了解terraform

terraform-docs

方便的查看资源的信息(支持markdown,json 格式),对于ci/cd 很方便

  • 项目地址
https://github.com/segmentio/terraform-docs
  • 安装
    for mac
brew install terraform-docs
  • 使用
    markdown 格式
terraform-docs md ./ > info.md
  • 使用效果

terraform-landscape

  • 项目地址
https://github.com/coinbase/terraform-landscape
  • 安装
    for mac
brew install terraform_landscape
  • 使用

    同时也可以使用docker 运行

terraform plan | landscape
  • 效果
-/+ random_string.id (new resource required)
    id: "none" => "<computed>" (forces new resource)
    length: "32" => "40" (forces new resource)
    result: "AeFw]#6iln(-Rk8MwwOVtZZuj2u*G#@Z" => "<computed>"

Plan: 1 to add, 0 to change, 1 to destroy.

tfenv

Terraform 版本管理的

tflint

方便检查我们的tf 文件编写是否有问题

  • 项目地址
https://github.com/wata727/tflint
  • 安装
    for mac
brew install tflint
  • 使用
tflint

blast-radius

图像可视化交互terraform 定义的资源

  • 项目地址
https://github.com/28mm/blast-radius

参考资料

https://github.com/28mm/blast-radius
https://github.com/wata727/tflint
https://github.com/coinbase/terraform-landscape
https://github.com/segmentio/terraform-docs

原文地址:https://www.cnblogs.com/rongfengliang/p/10558259.html