From Console Clicks to Code: A 12-Week InfraOps Story

From Console Clicks to Code: A 12-Week InfraOps Story

Neither the team below nor its employer is real. Both were made up to show how InfraOps habits work on a Monday morning, so treat every detail as an illustration, not a report. Imagine a platform group of six at an unremarkable software business. Their cloud account was built by clicking through a console over four years, and when a new engineering director asked for a rebuild plan, the honest answer was that nobody knew what a rebuild would involve.

Week one: counting before coding

The team lead resisted the urge to start writing code. Instead she exported an inventory and found roughly 300 resources in scope. Drawing on the Ops Atlas entry, the reference they used for the whole project, she noted that “import everything” is a trap: imported definitions copy historical accidents, and Google’s own guidance advises avoiding imports where possible. So the group wrote a short list ranking resources by what hurt most when they failed. Databases, network rules and identity roles filled the top ten.

Week two: the first ten

They brought exactly those ten resources under code. The Atlas offers this as an illustrative plan for a console-built estate: adopt the ten riskiest, then target coverage rising from zero to about 80 percent across a quarter. The team liked how modest it sounded. Each adoption followed the same pattern. Write the definition, run a preview, and expect it to show no changes. Any proposed change meant the code did not yet match reality, so they corrected the code, not the live system.

One adoption failed. A security rule appeared in the preview as “to be replaced”, which would have briefly cut off a customer-facing service. Because the preview was reviewed by a second engineer, the replacement never reached production. They adjusted the definition and tried again. That single catch paid for the weekly review habit in the team’s eyes.

Weeks three to six: a pipeline and a smaller state

The next job was getting applies off personal machines. They set up a CI job with its own identity, a read-only identity for previews, and a protected environment for production changes. They also noticed that their one big state file made every preview crawl, so they split it by environment and then by service. Reading the Atlas’s advice that a state should hold only a few dozen resources, they used it as a rough guide rather than a hard limit. For a view on how a delivery pipeline hangs together end to end, they leaned on a colleague’s article about smoothing out software delivery through automation.

Week seven: drift shows up

A nightly preview found its first discrepancy: a storage setting changed in the console during a support call. Nobody was in trouble. The team recorded the change, brought it into the code, and set a rule that drift should be assigned to a person with a three-day target, following the Atlas’s suggestion of about 72 hours. They explicitly rejected automatic reversal. A script with production credentials that quietly rewrites live settings, they agreed, was just an apply nobody reviews.

Weeks eight to twelve: images and a drill

Servers had been patched by hand. The group moved to building fresh images weekly and replacing hosts, after which patching meant “rebuild the image”, not “log in”. They also scheduled a rebuild drill: create a copy of the staging environment from code in an empty account. The first attempt failed in three places, including a firewall setting that had only ever existed in the console. The second attempt passed. Their cloud choices were shaped by a vendor-specific article on how one platform covers delivery, security and automation, though the habits they built apply anywhere.

A disagreement worth recording

Around week five the group argued about protecting their databases. One engineer wanted the code-level guard that makes a destroy command fail. Another pointed out, correctly, that the guard vanishes if somebody deletes the resource block from the configuration, a caveat the Atlas spells out. They settled on both layers: the guard in code and deletion protection switched on at the provider. A related argument concerned renames. Rather than deleting and recreating a resource after a tidy-up of names, they used a declarative move marker so the tool understood that nothing was being destroyed. The Atlas advises keeping such markers in the code for good, because removing an old one can break anyone who still depends on the earlier address. The team added a short comment above each marker explaining why it stayed.

What the numbers looked like at the end

At the end of the quarter, coverage was in the high seventies, and they had a list of the remaining unmanaged items with owners next to each. Drift incidents were rare but visible. The team chose to report two statements to leadership: a coverage figure, and the age of their oldest unresolved difference, because the Atlas argues a single flattering percentage tends to hide the awkward tail.

Lessons worth borrowing

  • Rank before you import; do not try to capture the whole estate at once.
  • A preview that is supposed to be empty is a test of your code.
  • Pipelines, small state and scheduled detection arrive in that order, and each makes the next easier.
  • Drills reveal what documents never do.
  • Protect valuable data twice, once in the code and once at the provider.
  • Report the awkward tail alongside the headline number, so nobody mistakes progress for completion.

Again, the team is imaginary. The sequence, though, is a realistic one: count, rank, adopt, automate, detect, rebuild.