Skip to main content
Terraform providers are native executables. Prepare the provider in one microVM, snapshot it, then run validation and planning in a fresh networkless worker. The random provider makes the flow easy to test because planning it does not need cloud credentials.

Run an offline plan

1

Create a test configuration

main.tf
2

Download and snapshot the provider

Copy the generated dependency lock file to the host:
Capture the downloaded provider:
Verify the snapshot before using it:
terraform init downloads the provider and creates .terraform.lock.hcl. The copy on the host is ready to review and commit when adapting this to a real module.
3

Plan offline

The provider loads and creates a plan, but it cannot contact any remote API. Providers, data sources, or validation rules that require a service will fail offline; that failure is the point of this vetting mode.
-refresh=false is not a network boundary. --no-net is. If you give a provider credentials and egress, changes it makes through an external API outlive the microVM.
4

Clean up

Remove the reusable snapshot:

Reference