liveBook · Manning

Rollback

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

Rollback is the restoration of infrastructure configuration or system state to an earlier known-good version.

Rollback restores infrastructure configuration or system state to a known-good version. With infrastructure as code, immutability makes this a forward-moving undo rather than a full state restoration. section 11.1.1

Handle a failed infrastructure change by:

  • Prioritize stabilization and restoration of service before investigating the root cause. section 11.0
  • Inspect version-control history to identify the previously working change. section 11.1.1
  • Use git revert to create and push a new configuration state through the IaC pipeline. section 11.1.1

Restoring a service permission

After removing roles/cloudsql.admin from the promotions service account, revert the commit and push the change. The pipeline adds the role back, producing a new working state without manual break-glass changes. section 11.1.1

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 commit inspection, git revert, and pipeline application, but stops short of general troubleshooting internals.
Examples
Uses a removed database role, Git history, git revert, and static-analysis recovery as concrete examples.
What it assumes
Assumes infrastructure as code, version control, and deployment pipelines while emphasizing stabilization before root-cause debugging.
What you can do after
Operate IaC recovery by reverting commits and rolling forward a known-working configuration through the deployment pipeline.
How it connects
Connects rollback with infrastructure as code, immutability, GitOps, version control, and static analysis.

Also explained in

Compare how 8 books explain rollback →

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.