Infrastructure as Code
Phase นี้เปลี่ยนจากการสร้าง resource ด้วย Console ไปเป็นการสร้าง infrastructure แบบ repeatable, reviewable และ versioned ด้วย Terraform พร้อมทำความเข้าใจ CloudFormation และ AWS CDK ในฐานะ AWS-native IaC
Learning path
Lesson 1
Terraform WorkflowProvider,
Resource, Data Source, Variable, Local, Output, fmt, validate, plan และ apply
Workflow
Lesson 2
State, Remote Backend and LockingTerraform state, S3 backend, locking, collaboration และ state
security
State
Lesson 3
Modules and EnvironmentsModule boundaries, dev/staging/prod structure, variables และ
outputs
Modules
Lesson 4
Import, Lifecycle and SecretsResource import, lifecycle meta-arguments, drift และการไม่เก็บ secret ใน
state/Git
Operate
Lesson 5
CloudFormation and AWS CDKCloudFormation stack, template, rollback, CDK constructs และการเลือก
tool
AWS-native
Lab 9
Terraform Infrastructure Baselineสร้าง VPC, EC2, Security Group, IAM Role, ALB, Auto Scaling Group, Module,
Remote State และ destroy
Hands-on
Review
Phase 9 Quizทบทวน Terraform
workflow, state, modules, import, lifecycle และ AWS-native IaC
Quiz
Phase 9 checklist จาก Roadmap
- เข้าใจ Terraform Provider, Resource, Data Source, Variable, Local, Output, State, State Locking และ Module
- ใช้
terraform fmt,validate,plan,applyและdestroyอย่างมีวินัย - จัด Remote State ใน S3 พร้อม locking และแยก environment เช่น dev, staging, prod
- เข้าใจ Resource import, lifecycle, secret handling, CloudFormation, AWS CDK และ tradeoff ระหว่าง tools