Terraform Plan Review Checklist: Find Drift, Risky Changes, and Configuration Mistakes
Terraforminfrastructure as codeIaCcloud infrastructuresecuritycode review

Terraform Plan Review Checklist: Find Drift, Risky Changes, and Configuration Mistakes

TToggle Editorial Team
2026-11-12
6 min read

A practical Terraform plan review checklist for spotting drift, destroys, replacements, permission changes, provider risks, and configuration mistakes.

A Terraform plan is a proposed change to infrastructure, not a routine formality. This Terraform plan review checklist gives you a repeatable way to inspect destroys, replacements, drift, permissions, provider changes, dependencies, sensitive values, and module outputs before approving an apply.

Overview

Before reviewing a plan, confirm that it was generated from the intended workspace, variable set, backend, account, region, and Terraform configuration revision. A visually familiar plan can still be dangerous when it targets the wrong environment or uses an unexpected variable file.

For a reviewable workflow, generate the plan in the same controlled context used by your deployment process. When appropriate, save it with terraform plan -out=tfplan, inspect it with terraform show tfplan, and apply that saved plan rather than generating a new proposal later. This reduces the gap between what reviewers approved and what Terraform is asked to execute, although external changes can still affect infrastructure between review and apply.

Start with the plan summary: resources to add, change, destroy, or replace. Then move from the summary to individual resources and their dependencies. Do not treat a plan with a small number of changes as automatically safe; a single IAM policy, network route, database, or security-group change can have a large operational effect.

For related configuration checks, a YAML, JSON, and TOML validation workflow can help catch malformed inputs before they reach Terraform: YAML, JSON, and TOML Config Validation.

Checklist by scenario

When the plan contains destroys

  • Identify every resource marked for destruction and explain why it is no longer represented as desired.
  • Check whether the destroy is intentional, caused by a renamed address, a changed key, a moved resource, or a missing configuration block.
  • Confirm whether the resource holds data, serves production traffic, or is referenced by another system.
  • Look for a replacement marker, usually shown as destroy-then-create or create-then-destroy behavior, rather than assuming an in-place update is possible.
  • Verify backup, recovery, retention, and migration steps before approving destructive changes.

A destroy warning deserves a direct explanation in the pull request. “Terraform wants to delete it” is not a root cause. The reviewer should be able to connect the action to a deliberate configuration change or an approved cleanup.

When the plan contains replacements

  • Find the attribute that forces replacement and check whether its new value is correct.
  • Review naming, addresses, identifiers, and immutable provider fields for accidental changes.
  • Confirm whether the replacement causes downtime, duplicate resources, quota pressure, or a temporary loss of connectivity.
  • Check dependency ordering and whether dependent resources will be updated only after the replacement is available.
  • Ask whether a state address change should be handled with a deliberate refactor or state move instead.

When the plan shows unexpected updates

  • Separate meaningful configuration changes from computed values, timestamps, ordering differences, and provider-normalized values.
  • Compare the changed attributes with the pull request, variable files, and module defaults.
  • Look for perpetual diffs caused by configuration that disagrees with values returned by the provider.
  • Check whether an external administrator, automation job, or console edit changed the resource.

When you suspect drift

Terraform can compare state and configuration with values observed from the provider during planning. A difference may represent configuration drift, a stale state value, provider behavior, or a legitimate external change. Treat the plan as evidence to investigate, not as proof that a particular person or process caused the change.

  • Confirm the plan used the correct state and workspace.
  • Compare the affected resource with the provider's current state using an approved read-only method.
  • Decide whether to bring the external change into configuration, revert it, or document it as an intentional exception.
  • Use a refresh-only workflow when the goal is to reconcile state observations rather than change infrastructure, and review that result separately.

When permissions or security controls change

  • Inspect additions to IAM roles, policies, trust relationships, firewall rules, security groups, routes, and public access settings.
  • Check whether a wildcard action, resource, principal, port, or network range was introduced.
  • Verify that access is granted in the intended account, project, subscription, region, and environment.
  • Confirm that secrets are referenced through an approved mechanism rather than embedded in configuration or command output.

What to double-check

Provider and Terraform version changes

Provider upgrades can change defaults, validation, schemas, and how existing values are represented. Review lock-file changes, provider constraints, and any resource types touched by the upgrade. A plan that is large because of a provider update should be split or tested separately when possible, so reviewers can distinguish upgrade effects from application changes.

Dependencies and module outputs

Follow references through modules, data sources, implicit dependencies, and explicit depends_on declarations. Check whether an output changes from a known value to an unknown value during planning, or whether a module output is consumed by another environment or deployment pipeline. A harmless-looking output rename can break downstream configuration even when the underlying resource remains healthy.

Sensitive values and plan handling

Redaction in terminal output does not mean a plan is safe to share without controls. Saved plan files and state commonly contain infrastructure details and may contain sensitive values or references. Store them only in approved locations, restrict access, avoid committing them to source control, and remove temporary artifacts according to team practice. Never paste an unreviewed plan into a public issue or online developer utility.

Operational impact

Translate resource actions into service outcomes. Ask whether a change affects availability, data durability, autoscaling, DNS, certificates, queues, observability, or rollback. Also check quotas and rate limits. The plan describes Terraform's resource actions; it may not fully describe application-level consequences, migration compatibility, or traffic behavior.

Common mistakes

  • Approving only the summary: The add/change/destroy count is a starting point, not an explanation.
  • Ignoring address changes: Renaming a resource or changing a for_each key can look like a destroy and create when the real intent was to preserve the object.
  • Using a broad exception to hide noise: Lifecycle settings or ignored attributes can conceal legitimate drift. Each exception should have a narrow reason and an owner.
  • Reviewing the wrong context: A correct plan for staging is not evidence that production is safe. Verify backend, workspace, credentials, variables, and commit.
  • Assuming plan is a lock: APIs, operators, scheduled jobs, and other pipelines can change infrastructure after planning. Use coordination and the saved plan workflow where appropriate.
  • Skipping the post-apply check: Confirm outputs, health signals, permissions, and critical resource state after applying. A successful Terraform exit does not replace service validation.

For a broader workflow around machine-readable configuration and API responses, see the jq command guide. Keep sensitive Terraform data out of browser-based tools unless your organization's handling rules explicitly allow it.

When to revisit

Use this checklist before every non-trivial Terraform apply, especially changes involving production, identity, networking, databases, provider upgrades, module refactors, or state reconciliation. Revisit it after an incident, an unexpected destroy, a provider behavior change, or a migration to a new backend or workspace structure.

Teams should also review their checklist before seasonal planning cycles and whenever their delivery workflow changes. Confirm that approval rules, plan storage, state access, secret handling, drift detection, and post-apply checks still match reality. At least twice a year, test the checklist against a representative plan and update examples for the Terraform and provider versions your team actually uses.

Final pre-apply action: record the target context, summarize unusual actions, explain every destroy or replacement, confirm security-sensitive changes, verify the saved plan or approved execution path, and name the person responsible for post-apply validation. If any of those answers is unclear, pause the apply and investigate before infrastructure changes become an incident.

Related Topics

#Terraform#infrastructure as code#IaC#cloud infrastructure#security#code review
T

Toggle Editorial Team

Developer Tools and DevOps Editors

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.