liveBook · Manning

Roll-forward

As explained in Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

A recovery technique that corrects a failed or faulty change by applying a subsequent corrective change rather than reverting to a previous state.

Roll-forward is an infrastructure-as-code recovery technique: apply a subsequent corrective change to create a new working state instead of restoring infrastructure to an earlier state. Immutability means every change creates new resources or state, so a true rollback is not available. section 11.0 section 11.1.1

Use a roll-forward approach to restore functionality while limiting further disruption:

  • Stabilize the service and restore functionality before pursuing the root cause. section 11.0
  • Inspect version-control history, identify the faulty change, and use IaC rather than manual break-glass repairs. section 11.1.1
  • Revert the faulty commit when matching the prior working behavior is sufficient, then promote the resulting change through testing and production. section 11.1.1
  • Create new environments or services and shift traffic with a canary deployment when reverting does not restore the system. section 11.1.2
  • Reconcile drift, dependencies, and environment differences before re-implementing the original change. section 11.4 section 11.3.3

Restoring the promotions service

Removing roles/cloudsql.admin breaks the promotions service. Inspecting Git history reveals the faulty commit; reverting it adds the role back through the pipeline and produces a new state matching the previous working behavior. If that repair fails, deploy a new promotions service and gradually move traffic to it. section 11.1.1 section 11.1.2

Figure 11.2 You add the administrative database role for the promotions service to roll forward the system to a working state.

Shows the administrative database role being added back to restore the promotions service. section 11.1.1

How Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform covers it

How deep it goes
Explains reverts, new environments, traffic shifting, and drift checks, but defers detailed general troubleshooting and root-cause practice.
Examples
Uses service-account permissions, Git commits, replacement environments, canary traffic shifts, and failed tool upgrades as operational examples.
What it assumes
Assumes familiarity with infrastructure as code, immutability, version control, deployment environments, and basic service troubleshooting.
What you can do after
Diagnose and repair failed IaC changes incrementally through version control, testing environments, pipelines, and controlled traffic shifts.
How it connects
Connects infrastructure as code with immutability, GitOps, canary deployment, blue-green deployment, rolling updates, drift, and change management.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform. The section links point to the parts of the book it draws on.