An introduction to Terraform on Azure — Platform Governance in Practice
I learned Terraform the usual way: I opened the documentation, created a resource group, added a VNet, and broke things in a subscription where breaking things was allowed.
The early questions had tidy answers. Where should variables go? How should I structure a module? What does plan show me before apply changes anything? Books and examples were good at this part. After a while, I could read a plan without holding my breath.
The difficult part started when the code belonged to more than one team.
The questions change
Once several teams share the same platform, the questions stop being about one Terraform feature at a time. They look more like this:
- The Azure Activity Log shows that a shared account changed a private endpoint, but not which person or team used it. How do we give teams enough access to work without losing accountability?
- A database moves behind a private endpoint. The application can reach it, but the deployment pipeline cannot. What else has to move when a service becomes private?
- A routine capacity change produces a plan that would also restore last month's container image. Which fields belong to the platform configuration, and which belong to the application release?
Each problem starts with an operational event, not an obscure piece of HCL. The work is to narrow it into something verifiable, decide whether Terraform should own it, and choose the right boundary and order of change.
Why I am writing this series
I wanted to write about that gap: the space between knowing Terraform and using it safely in a platform shared by several teams.
The series won't move through Terraform features one by one. It will follow operational problems and bring in Terraform where it helps. Sometimes the answer is in tfvars; sometimes it is a module boundary or a question of state ownership. The important part is understanding why that boundary exists before encoding it.
The setting is a fictional organization called EG. It has dev and prod subscriptions, three application teams named relay, pulse, and harbor, and a platform engineer named Dee who is often pulled into the middle.
Each post starts with a problem that could arrive in a support channel: a change nobody can trace, a pipeline that can no longer reach Key Vault, or an application that needs to move behind a private endpoint. From there, we'll work out what happened, who owns which part, and whether Terraform should manage it.
The story is arranged in three acts:
Act I · Who can change what Act II · How far can we narrow access
Permission autonomy Hardening (network · private access · edge)
│ │
└────────────────┬───────────────────────┘
▼
Act III · Can we keep production running
Operations · monitoring · cost
│
▼
Toolbox · quality and efficiency
Act I deals with people, teams, permissions, and deployment identities. Act II moves into networking, private access, and the public edge. Act III looks at what happens after the platform is running: drift, monitoring, cost, and maintenance.
There is also a toolbox section for Checkov, TFLint, terraform-docs, Infracost, terraform test, and pre-commit. These tools matter, but only after we've decided what rule they are supposed to enforce.
What to expect
This is not a syntax course. It is for people who already know enough Terraform to create resources, then discover that creating them was the simple part.
If you've ever looked at a valid plan and still wondered whether applying it was the right thing to do, you are in the right place.
Top comments (0)