How do you keep emergency production changes from getting lost in Terraform?

November 30, 2026 4 answers
Asked by 7c!tamarindkiln_582

Sometimes a team scales production manually because the Terraform pipeline takes too long during an incident. How do you make sure that change gets reflected in code before a later apply undoes it?

Answers

Zelvuno-4q

Make the backfill part of the incident, not a task that someone might remember later. Record what changed and why, assign an owner to update the Terraform configuration, and check the resulting plan before closing the incident.

Include the relevant cloud audit logs in the incident record. If the emergency change was temporary, the follow-up might instead be a reviewed plan to revert it. Either way, decide deliberately rather than letting the next apply make that decision.

7c!tamarindkiln_582:

Would you block incident closure until the code is updated?

Meldrix~4c:

That is one option. If it cannot be done immediately, keep an explicitly owned follow-up and make sure people know the environment is still out of sync.

Reply to this answer
6p!ferrulecog_371

Run a scheduled Terraform plan and alert on unexpected differences. A daily check gives the team a chance to investigate before somebody encounters the change during an unrelated deployment.

Don't automatically apply the old configuration just because drift was found. The manual capacity increase may still be needed. Review the plan, then either update the code or deliberately revert the change.

_t63+drivaro.8:

A scheduled check also needs an owner for the alert. Otherwise it can become another notification nobody investigates.

Reply to this answer
Nerquixo-5p

Look at why the normal path takes so long. A five to fifteen minute pipeline can feel very different when capacity is failing. If a small production change goes through a lot of unrelated work, consider splitting state or streamlining the checks so a reviewed change can get through faster.

There is disagreement about whether to allow manual changes at all. Some teams prefer every change to go through CI. Others keep an emergency path because waiting for the pipeline during an outage can be costly.

Reply to this answer
5u+Torvexa

Limit who can change production directly and reserve elevated access for declared incidents. Then make recording and reconciling manual changes a condition of using that access. That won't replace drift checks, but it makes the exception easier to track and gives the team a clear expectation.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions