📄️ Unit Testing
Unit testing ใน Terraform = test logic ของ config โดยไม่ต้อง apply จริง — ใช้ terraform test framework (1.6+)
📄️ Contract Testing
Contract testing = ตรวจว่า module interface (inputs/outputs) ตรงกับที่ caller คาดหวัง — ไม่เกี่ยวกับ behavior ภายใน
📄️ Integration Testing
ทดสอบ Terraform ด้วยการ apply ใน real cloud แล้วตรวจ behavior — ใช้ Terratest หรือ terraform test
📄️ End-to-End Testing
E2E testing = ทดสอบทั้ง flow ตั้งแต่ infrastructure ขึ้น → application พร้อม → user flow ทำงานได้
📄️ Testing Modules
สรุป best practices การ test Terraform module — combine unit + contract + integration