A dry run analyzes infrastructure-as-code changes and reports expected effects before applying them to target resources. It can expose dependencies, such as a server changing when its network changes, without altering live infrastructure. section 1.5.2
Use a dry run as an operational checkpoint:
- Define or modify the infrastructure configuration. section 1.5.2
- Generate a preview of additions, changes, removals, and affected dependencies. section 1.5.2
- Inspect the preview for unintended changes before applying it. section 10.2.1
- Use the preview or resulting state as test input when configuration alone omits computed values. section 6.2.2
Terraform preview and configuration tests
Terraform can save a plan and render it as JSON: terraform plan -out=dry_run && terraform show -json dry_run > dry_run.json. Tests can then inspect infrastructure metadata such as a network name, subnet count, and IP ranges without deploying the network. During refactoring, a successful no-change plan confirms that imported resources still match the configuration. section 6.2.2 section 10.2.1
Table 1.1 Examples of provisioning tools and providers (view table figure)
| Various (for a complete list, see www.terraform.io/docs/providers/index.html) |
|
| Various (for a complete list, see www.pulumi.com/docs/intro/cloud-providers/) |
|
Compare provisioning tools and the providers they support before choosing a dry-run workflow. section 1.5.2


