DevOps By Hank

IaC:Terraform State 管理

State File 保護

Terraform 的 tfstate 檔案包含基礎設施的敏感資訊(甚至可能有密碼)。

  1. 務必使用 Remote Backend (如 AWS S3 + DynamoDB Lock)。
  2. 開啟 S3 Bucket Encryption。
  3. 絕對不要將 tfstate commit 進 Git Repo。