From clickops to code
Azure Infrastructure as Code
An Azure estate built by hand can't be reviewed, rebuilt or audited. This engagement converts what exists into Terraform modules with a state strategy, approval gates, drift detection and a pipeline that authenticates without a stored secret.
Why this matters more than it sounds
An Azure estate built in the portal has no history. You cannot diff it, review a change before it happens, rebuild it after a mistake, or prove to an auditor what it looked like in March. Every statement about it is a screenshot taken at a moment that has already passed.
The usual objection is that converting it is a large project with no visible output. That is true of a conversion done all at once. Done in the order below, each step is independently useful and the estate is never in a half-migrated state nobody can reason about.
How the conversion runs
- Inventory and boundaries. What exists, what owns it, and where the natural state boundaries are. State design is the decision that determines whether this is maintainable, and it is very expensive to revisit later.
- Module structure. A small set of modules that match how your team actually thinks about workloads, with versioning, rather than a module per resource type that nobody composes correctly.
- Import, in waves. Existing resources imported into state so the code describes reality. Each wave ends with a clean plan — no diff, no surprises — which is the only acceptable definition of done.
- Pipeline. Plan on pull request with the output posted for review, apply behind an environment approval, and authentication by federated credential so there is no client secret to rotate, leak or inherit.
- Drift control. A scheduled plan that reports what changed outside code, because something always will, and a documented decision about what happens when it does.
Federated credentials, not service principal secrets. Pipelines authenticate to Azure through workload identity federation — nothing long-lived is stored in the repository or the CI system. Where a secret genuinely must exist, it lives in Key Vault with a rotation path, not in a pipeline variable someone marked as secret in 2022.
What gets reviewed if code already exists
Plenty of estates are already partly in Terraform, and the problem is the shape of it rather than its absence. In that case the engagement is a review and a restructure: state layout and blast radius, module boundaries and duplication, provider and version pinning, how secrets reach the plan, what the pipeline's identity can actually do at what scope, whether anyone could run a destroy by accident, and whether the repository would pass the pipeline-security questions on a customer security questionnaire.
Pipeline identity scope is the finding that comes up most often. A service connection with Contributor at subscription scope, used by a pipeline any contributor can trigger from any branch, is a privilege escalation path with a convenient user interface — the same category of problem as standing Owner access held by people, with none of the attention.
What you receive
- A Terraform repository that describes the estate, with a clean plan against it
- GitHub Actions or Azure DevOps pipelines with OIDC federated authentication, plan-on-PR and gated apply
- Remote state with locking, and a documented recovery procedure for state corruption
- Drift reporting and a documented response process
- Module documentation and a working session with your team on extending it
How it's scoped
Scoped by resource count, how much is imported versus rebuilt, and which CI platform you run. Fixed fee against a written scope. Where the estate is large, it is scoped as waves you can stop between — each wave leaves you better off than before it, which is deliberate.
If the underlying platform needs work too, this engagement usually follows the landing zone and governance build, since importing an estate into a hierarchy you're about to change is wasted effort.
Quoted in writing against an agreed scope after a scoping call. Large estates are scoped as independently useful waves rather than one long engagement.
Is this the right starting point?
A short email describing your environment and what's prompting the question is enough to get a straight answer — and if this isn't the engagement you need, I'll say so.