Separate experimentation from owned infrastructure
A console can be a reasonable place to inspect a service or confirm a one-time configuration option. The operating problem begins when a critical resource depends on undocumented permissions or settings that another environment cannot reproduce. Identify which parts of the stack have an owner and will change repeatedly.
Express those resources as code and put the execution plan into the review process. A useful plan shows the actual changes that will occur. Review replacements and deletions closely, especially for durable stores, certificates and anything carrying public traffic.
Treat state as part of the architecture
A Terraform resource address maps configuration to a specific remote object. Use documented imports or moves when adopting existing infrastructure or renaming addresses. Treat a plan to replace an apparently unchanged production resource as a reason to reconcile state and ownership before applying.
Keep production state in a restricted versioned backend with locking when several operators can apply. Store state separately from public application assets. Avoid exposing values through outputs and logs simply because the configuration can reference them.
- Change proposal
- initialize and validate
- saved plan
- review
- apply
- verify
Match the scope of a plan to the blast radius
Separate components when they have different owners, credentials or release cadence. A public site upload does not need permission to change DNS or IAM policy. A new certificate and its DNS validation may require a coordinated sequence even when both parts are represented in the same repository.
Targeted plans can help bootstrap a prerequisite, but run the broader plan afterward to show what remains. When a provider or API accepts a change asynchronously, record the signals that indicate readiness and verify the result from the user-facing endpoint.
Keep an emergency path with reconciliation
Document when an operator may make an urgent manual change and how to record it. Review drift afterward, importing or codifying the change where appropriate. The goal is to recover safely and preserve a reliable source of truth once the incident is over.
Infrastructure as code trades upfront design and review for repeatability. Use abstractions only where they describe meaningful ownership or repeated behavior. A small, direct configuration is often easier to diagnose than a deeply parameterized module hierarchy.
Key takeaways
- Review saved plans for unexpected changes to durable resources.
- Protect state and reconcile ownership deliberately.
- Match deploy permissions to the resources each workflow needs.