Reliability and operational limits
Bound the blast radius
Reliability means changes complete with the intended effects and failures remain manageable. Split independent infrastructure ownership where appropriate, use distinct state and access boundaries, and verify service health at each release stage. Separate state roots are not a distributed transaction. An upstream change may succeed while a dependent root fails. Define compatible output contracts and a recovery owner before deployment.
Network root -> approved versioned endpoint contract -> application rootApplication rollout -> service health check -> next rollout stageFailure -> pause subsequent stages; reconcile observed and intended stateDo not duplicate management of one remote object across roots. Keep a dependency inventory, a maintenance window and an explicit rollback or forward-fix decision.
Recognize throttling and eventual consistency
API throttling means a service limits requests over a window. Eventual consistency means a successful write might not be immediately visible to a later read. These are different from invalid configuration, denied permissions or exhausted capacity. Providers and SDKs may already implement retry behavior. Inspect actual error classifications and version-specific retry settings rather than adding a second unbounded loop. An accepted API operation can continue after a client timeout; inspect the result before attempting another create.
Fictional incident timeline (not real provider output)00:00 Approved change starts; two independent roots share an API quota.00:10 Root A completes a create; Root B receives a throttle response.00:20 Root B reaches its retry budget; run fails.00:25 Operator pauses new runs, checks locks, state and remote inventory.00:35 A fresh full plan is reviewed after reconciliation; no automatic apply.The first root may already have changed infrastructure. Treat a failed run as potentially partially successful. Pause conflicting runs, preserve redacted diagnostic evidence, confirm account and state ownership, then review a fresh full plan.
Set a bounded retry policy
Retry only errors classified as transient and only when the operation is safe to retry or the provider supplies a documented idempotency mechanism. Use capped exponential backoff with jitter (randomized delay) to avoid synchronized retries. Set maximum total attempts and elapsed time. The following example is a policy model for an approved idempotent read, not Terraform configuration or universal provider defaults.
Initial attempt + at most 3 retries; deadline 12 seconds.Delay ceilings: 1, 2, 4 seconds; jitter samples between zero and each ceiling.Retry only transient errors while deadline and attempt budget allow.Permission denied or ambiguous non-idempotent create: stop and investigate.The seven-second sum of delay ceilings does not include execution time. Check remaining deadline before starting another operation and bound its timeout too. Nested provider and workflow retries multiply load; coordinate them rather than retrying everything at every layer.
Coordinate concurrency across runs
Reducing parallelism in one root does not control every other worker. Use CI or platform run queues, separate environment permissions and shared quota-aware scheduling. Preserve state locking for writers to the same state and distinguish lock contention from API contention across independent states.
Fictional review: three roots, each permits four graph operations.Potential graph operations in flight across roots: up to 12.This is not 12 API requests per second.If quota symptoms occur, pause new runs, inspect provider telemetry, and review lower concurrency or staggered scheduling.Do not test limits by flooding live services. Use synthetic fixtures first, and require authorization for any real performance experiments.
Measure outcomes after the change
Track successful plan/apply duration, error and throttle counts, queue depth, service availability, recovery time and unplanned replacements. Compare repeated samples in a fixed environment; keep the run scope and correctness checks constant. A shorter plan does not prove a healthier service. For a failed rollout, confirm actual application health, state consistency and downstream dependencies before resuming. Next: Terraform architecture and internals.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Reliability and operational limits — knowledge check
Review dependency performance and bounded recovery.
A create times out with an unknown remote outcome. What next?
Which retry policy is appropriate for a safe transient read?
Two roots share a cloud API quota. What is true?
What should a failed apply imply?
What should determine whether an optimization succeeds?