Infrastructure as Code (IaC) หมายถึงการกำหนดและจัดการโครงสร้างพื้นฐานของคุณ (เซิร์ฟเวอร์ เครือข่าย ฐานข้อมูล) ผ่าน ไฟล์โค้ด/configuration แทนที่จะตั้งค่าด้วยมือ เครื่องมืออย่าง CloudFormation, Terraform และ CDK ทำให้โครงสร้างพื้นฐานทำซ้ำได้ version-controlled และเป็นอัตโนมัติ
ปัญหาที่ IaC แก้ไข
MANUALLY setting up infrastructure (clicking in the Console) is:
→ not REPEATABLE (hard to recreate identically; error-prone)
→ not VERSIONED (no history of what changed, by whom, why)
→ not DOCUMENTED (the setup lives only in someone's memory/clicks)
→ hard to review, share, or roll back
→ IaC defines infrastructure in CODE → solving all of this.
