Chapter 25 · Part 5

Infrastructure as Code in CI/CD

A focused chapter on infrastructure as code in ci/cd, with practical delivery concerns, trade-offs, and the operational questions behind CI/CD work.

25-1

Infrastructure as Code: Why Your Server Setup Belongs in Git

You are about to deploy a new feature. The application code is ready, the tests pass, and the pull request has been approved. But then someone asks: "Did

6 min
25-2

Infrastructure Changes Need Code Review, Just Like Application Code

You have a server running in production. Someone on your team needs to open a new port for a monitoring tool. They log into the cloud console, find the

5 min
25-3

Why You Should Plan Infrastructure Changes Before Applying Them

You're reviewing a pull request that changes one line in a firewall configuration file. The change opens port 443 for public traffic. Simple enough, right?

5 min
25-4

Your Cloud Infrastructure Is Drifting Away From Your Code. Here's How to Catch It.

You've written your infrastructure as code. You've run terraform plan, reviewed the output, and applied the changes. The resources appear in the cloud

6 min
25-5

Testing Infrastructure Changes Without Breaking Production

A developer makes a small change to a firewall rule. "Just one config tweak," they think. Minutes later, no one can access the application. Users start

5 min
25-6

Policy as Code: Keeping Infrastructure Changes Under Control

You have three environments: development, staging, and production. Each one is managed through infrastructure as code. The pipeline runs, plans look good

6 min
25-7

When Infrastructure Changes Break Production: Recovering From IaC Disasters

You have done everything right. The Terraform plan was reviewed by two senior engineers. The change passed policy checks in your pipeline. It ran cleanly

6 min