Safeguard
Developer Tools•

Which preview should I run: plan, change set, template or diff?

A decision table for Terraform plan, CloudFormation change sets, helm template and kubectl diff: what each shows, what it skips, and when to use it.

Safeguard Security Team
4 min read

Use the preview that matches your tool: terraform plan for Terraform, a change set for CloudFormation, helm template plus a server dry run for Helm, and kubectl diff for Kubernetes manifests. Each shows proposed effects, none guarantees success, and none judges security, so run policy checks on the output.

The decision table

ToolPreviewWhat it showsWhat it does not do
Terraformterraform planProposed create, update and delete actions for a runJudge whether results are safe
CloudFormationChange setHow proposed changes may affect running resources, including replacements and deletionsGuarantee the update will succeed
Helmhelm templateRendered manifests, computed locallyServer side testing such as API support
Helminstall with dry run set to serverA simulated install on the clusterPolicy beyond what the cluster enforces
Kuberneteskubectl diffLive object versus the would be applied versionWhether admission will accept it
Kubernetesapply with dry run set to serverAdmission, validation and conflicts without savingWhat changes on the live object

Notes on each

Terraform plan. Add the detailed exit code option so CI can tell no changes from changes. See the exit codes.

CloudFormation change sets. AWS says they preview how changes might affect running resources and whether critical resources will be deleted or replaced. CloudFormation only makes changes when you execute the change set. AWS also notes that change sets do not guarantee a successful update, because runtime conditions can still cause failures. Checks during change set creation cover common causes such as property syntax errors, name conflicts and service quota limits.

Helm. Template is local and fast. The dry run set to server option asks the cluster. See template versus dry run.

Kubernetes. Diff shows the effect on the live object and exits 1 when it finds differences. Server dry run shows admission results. Use both. See client versus server dry run.

What every preview misses

  • Security judgement. A preview says what will change, not whether the result is risky.
  • Drift you did not cause. A preview compares your change, not everything someone did by hand.
  • Anything after deploy. Runtime behaviour needs monitoring.

So pair every preview with a policy check on its output: the plan JSON, the change set contents, the rendered chart or the diffed manifests.

A short routine for a pull request

  1. Render or plan with the tool's preview.
  2. Run policy checks on that output.
  3. Post the preview as a review artifact.
  4. Require approval for changes that delete or replace stateful resources.
  5. Deploy the exact thing you previewed.

Try it yourself

Click through it at your own pace, or open it full screen.

Look at how a gate sits between the change and the merge. Your preview output is what that gate should be reading.

Quick check

Does a clean change set mean the update will succeed?

No. AWS states that change sets do not guarantee success, since runtime conditions can still cause failures.

Which preview needs no cluster access?

helm template renders locally. A kubectl diff or server dry run needs access to the cluster.

Safeguard runs policies and gates on pull requests, so a failed rule can hold a merge, and its dependency and SBOM scanning covers the packages your infrastructure code pulls in. You can try a free scan at gold.safeguard.sh/scan.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.