FREETerraform CLIAWS / Azure / GCP / OracleLite / Pro / Pro Plus coming soon
Terraform: FREE interactive emulator for AWS, Azure, GCP, and Oracle
Learn Terraform step by step with a visual learning-mode emulator. It includes guided challenges, a simulated terminal, infrastructure canvas output, and commands ready to copy or run.
40 explained Terraform commands
Use Copy to send the command to your clipboard or Run to load it into the emulator on this same page.
#
Command
Explanation
Copy
Run
1
terraform init
Initializes the working directory and downloads required providers/modules.
2
terraform init -upgrade
Upgrades providers and modules while respecting version constraints.
3
terraform init -backend=false
Initializes without configuring a remote backend; useful for local validation or CI.
4
terraform fmt
Formats .tf files using Terraform standard style.
5
terraform fmt -recursive
Formats the current directory and all subdirectories.
6
terraform validate
Validates syntax, types and internal structure without creating resources.
7
terraform validate -json
Returns validation results as JSON for automated integrations.
8
terraform plan
Previews the changes Terraform would make to the infrastructure.
9
terraform plan -out=tfplan
Saves the plan so it can be applied later in a controlled way.
10
terraform plan -destroy
Previews destruction of resources managed by the state.
11
terraform plan -var="env=dev"
Runs the plan using a variable passed from the command line.
12
terraform plan -var-file="dev.tfvars"
Runs the plan using variables from a tfvars file.
13
terraform apply
Applies proposed changes and creates, modifies or deletes resources.
14
terraform apply tfplan
Applies a plan previously saved with -out.
15
terraform apply -auto-approve
Applies without interactive approval; use only in labs or controlled CI/CD.
16
terraform destroy
Destroys infrastructure managed by the current state.
17
terraform destroy -auto-approve
Destroys without asking for confirmation; critical command to use carefully.
18
terraform output
Shows values defined in output blocks.
19
terraform output -json
Shows outputs as JSON for integrations and scripts.
20
terraform state list
Lists resources Terraform manages in the current state.
21
terraform state show aws_instance.demo
Shows detailed attributes for one resource in state.
22
terraform state mv old new
Renames or moves a resource within state without recreating it.
23
terraform state rm resource
Removes a resource from state without deleting it from the real cloud.
24
terraform import resource id
Imports an existing resource so Terraform can manage it.
25
terraform refresh
Refreshes state from provider data; newer workflows prefer plan/apply.
26
terraform providers
Shows providers required by the configuration and modules.
27
terraform providers lock
Generates or updates the provider lock file for repeatable runs.
28
terraform version
Shows the installed Terraform version and relevant provider versions.
29
terraform console
Opens an interactive console to evaluate Terraform expressions.
30
terraform graph
Generates a DOT dependency graph between resources.
31
terraform workspace list
Lists available workspaces.
32
terraform workspace new dev
Creates a workspace to separate state by environment.
33
terraform workspace select dev
Switches to the dev workspace.
34
terraform workspace show
Shows the active workspace.
35
terraform taint resource
Marks a resource to be recreated on the next apply.
36
terraform untaint resource
Removes the taint mark from a resource.
37
terraform login
Logs in to use Terraform Cloud or HCP Terraform.
38
terraform logout
Logs out of the saved Terraform Cloud/HCP session.
39
terraform test
Runs native Terraform tests when test files exist.
40
terraform modules
Shows modules used by the configuration when supported by the CLI.
The emulator is educational: it does not request credentials, connect to real clouds, or create real resources.
Access your Weisewelt ecosystem
WILOLIMCurrent language: en
Hi, I am WILOLIM. I can help you find blogs, products, diagnostics, emulators, microcourses and knowledge routes in the current language.
🔎 Searching only in this language... en
Suggestions
Detected automatically
WeiseWelt
Privacy and cookies
We use necessary cookies to make the site work. With your permission, we may also use preference, analytics, and marketing cookies to improve your experience.