IaC and Kubernetes Example Runbook
Use this runbook for the EKS/Terraform examples in:
project-37-eks-terraform-provision/DevOps-Projects/projects/38-docker-terraform-3tier/terraform-configsproject-46-eks-cluster-terraform-advancedproject-48-terraform-aws-eks
Before Planning
Section titled “Before Planning”- Replace documentation CIDRs such as
203.0.113.0/24with your own/32or trusted admin range. - Keep backend placeholders local until the S3 bucket and DynamoDB lock table exist.
- Do not commit rendered secret files such as
db-secret.yaml; keep only*.template.yamlin source.
Local Validation
Section titled “Local Validation”Run formatting and syntax checks before opening a PR:
terraform fmt -check -recursive project-37-eks-terraform-provisionterraform fmt -check -recursive /DevOps-Projects/projects/38-docker-terraform-3tier/terraform-configsterraform fmt -check -recursive project-46-eks-cluster-terraform-advancedterraform fmt -check -recursive project-48-terraform-aws-eks
terraform -chdir=project-37-eks-terraform-provision validateterraform -chdir=/DevOps-Projects/projects/38-docker-terraform-3tier/terraform-configs validateterraform -chdir=project-46-eks-cluster-terraform-advanced validateterraform -chdir=project-48-terraform-aws-eks validate
kubectl apply --dry-run=client -f /DevOps-Projects/projects/48-terraform-aws-eks/db-secret.template.yamlkubectl apply --dry-run=client -f /DevOps-Projects/projects/48-terraform-aws-eks/deployment.yamlkubectl apply --dry-run=client -f /DevOps-Projects/projects/48-terraform-aws-eks/service.yamlIf provider plugins are not already initialized, run terraform init -backend=false in the target folder first. Avoid terraform plan or terraform apply in CI unless cloud credentials and cost controls are explicitly configured.