幾個方便的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