Skip to main content
DevOps Insightsguides & answers

Topic

Infrastructure as Code

Articles
10
Answered questions
1
Guides
4
On this page · 7 sections

Infrastructure as code moves servers and networks into the same review, history and rollback workflow as application code. The benefit that matters most is not automation; it is that you can answer "what changed?" with a diff.

The hard parts are state and drift. Terraform provisions resources and records what it created; when reality diverges from that record — someone clicked something in a console — you get the failures that make IaC feel fragile. Understanding state is most of understanding Terraform.

Learning paths

Existing pages in an order where each step answers a question the previous one raised, with an exercise at the end.

Guides

Step-by-step, with copy-paste commands and an assistant that answers questions about the guide you are reading.

Troubleshooting

Named errors and symptoms, each with its causes, a command that confirms each one, and the fix.

Commonly confused

Pairs of things that get mistaken for one another, and the problem the mix-up causes.

Why it works that way

The design decision behind the behaviour, and what it costs you.

Articles

Ordered by how much they are read.

Diagram: nginx terminating TLS for a client and proxying to three upstream application servers.
7 min
InfrastructureIntermediate

Nginx as a Reverse Proxy: The Config, and What Breaks

The six lines that proxy, the four headers most examples omit, and the three failures a reverse proxy actually produces — 502, 504 and the 499 nobody receives.

#Nginx#Linux#SRE

Neeraj Jha

529
Diagram: a Terraform resource block going through plan and apply, with the state file read by plan and written by apply.
10 min
InfrastructureBeginner

Infrastructure as Code with Terraform: State, Modules and CI

Learn Infrastructure as Code with Terraform — from your first resource to production-ready modules, state management, and CI integration.

#Terraform#AWS#CI/CD

Neeraj Jha

Updated

418
Bars showing a node 96 percent requested but 10 percent used, and a new Pod stuck Pending for insufficient CPU.
8 min
InfrastructureIntermediate

Why Your Kubernetes Cluster Is Full at 10% Utilisation

Why a Kubernetes cluster is full at 10% utilisation: the scheduler commits against requests, not usage, and that gap is where most overspend lives. Your dashboards and the scheduler are both right.

#Kubernetes#SRE

Neeraj Jha

179
Diagram: an AWS VPC with an internet gateway, a public subnet holding a load balancer and NAT gateway, and a private subnet holding EC2 instances and RDS.
8 min
Cloud ComputingBeginner

AWS EC2 and VPC: Building Your First Cloud Infrastructure

Step-by-step guide to building your first AWS infrastructure — VPCs, subnets, security groups, EC2 instances, and networking fundamentals.

#AWS

Neeraj Jha

Updated

158
Diagram: an Ansible control node running a playbook over SSH against three web hosts from its inventory.
7 min
InfrastructureBeginner

Ansible for DevOps: Automating Server Configuration

Get started with Ansible for server automation — inventory, playbooks, roles, common modules, and best practices for DevOps workflows.

#Ansible#Linux

Neeraj Jha

157
Diagram of How AWS decides, for a request inside one account: 1. Any explicit Deny?, 2. Resource control policies, 3. Service control policies, 4. The resource's own policy, 5. Your IAM policies, 6. Permissions boundary.
4 min
Cloud ComputingBeginnerNew

AWS Said Access Denied. Here Is How to Find the Policy That Did It

When AWS says AccessDenied, the error names only one of the several policy types it checks in a fixed order: how to find the policy that actually said no. The two phrases that tell you where to look, and the one command to run first.

#AWS

Neeraj Jha

Updated

Diagram of An anonymous request for one object: 1. Anything public?, 2. ACLs switched off?, 3. Account settings, 4. Bucket settings, 5. Encryption, 6. Allowed.
4 min
Cloud ComputingBeginnerNew

Your S3 Bucket Is Not Public. That Is the Feature

You added a public bucket policy and still get 403. Block Public Access has four switches at two levels, two of which only refuse new grants. How they combine, why encryption can block the internet too, and the safer way to publish files.

#AWS

Neeraj Jha

Diagram of What a stop and start does to one instance: 1. Stop pressed, 2. Charges pause, 3. Host released, 4. Public IP released, 5. Start pressed, 6. New public IP.
4 min
Cloud ComputingBeginnerNew

Stop, Start, Surprise: What Your EC2 Instance Forgets

What rebooting, stopping, hibernating and terminating an EC2 instance each keep and lose, from AWS's own comparison. Four actions that sound similar and are not, including the public IP that changes and the disk that vanishes.

#AWS#Linux

Neeraj Jha

Diagram of How one lowercase letter fails an apply: 1. Plan, 2. Apply, 3. Provider returns, 4. Terraform compares, 5. Error, object tainted.
3 min
TerraformIntermediateNew

Provider Produced Inconsistent Result After Apply, Explained

Provider produced inconsistent result after apply means the API rewrote a value you sent. How to read the was and but now values, fix the configuration, and avoid the tainted resource it leaves behind.

#Terraform

Neeraj Jha

Diagram of How an upgrade breaks every plan: 1. Provider upgrade, 2. Identity support changes, 3. Existing resources read, 4. Every plan fails, 5. Next release or a pin.
3 min
TerraformIntermediateNew

Terraform Identity Errors After a Provider Upgrade

Missing Resource Identity After Read and Unexpected Identity Change usually start right after a provider upgrade. Why they are provider bugs, and the upgrade-or-pin fix that clears them.

#Terraform#AWS

Neeraj Jha

Answered questions

Real questions from the community, with an accepted answer.

Other topics