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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM