Terraform / OpenTofu Command Helper
Interactive CLI command generator and safe state surgery helper for HashiCorp Terraform and OpenTofu IaC workflows.
Initialize Working Directory
Download required providers, modules, and configure remote state backend.
terraform initUpgrade Providers to Latest Compatible
Re-evaluate provider version constraints and update the dependency lock file.
terraform init -upgradeReconfigure Backend State
Ignore existing backend configuration and configure a new remote backend.
terraform init -reconfigureList All Workspaces
Show all isolated state workspaces in current working directory.
terraform workspace listCreate New Workspace
Create and immediately switch to a new environment workspace (e.g. staging, prod).
terraform workspace new productionSwitch to Existing Workspace
Switch active state context to the specified workspace.
terraform workspace select productionPreview Changes (Standard Plan)
Compare local configuration against live state and display planned infrastructure additions/deletions.
terraform planSave Plan to File for Safe Apply
Serialize exact execution plan to disk to guarantee identical changes upon apply.
terraform plan -out=tfplanApply Saved Plan File
Execute changes exactly as recorded in the saved plan without re-prompting.
terraform apply tfplanTarget Plan (Single Resource or Module)
Isolate execution planning to a single resource or module, ignoring other changes.
terraform plan -target=module.vpc.aws_subnet.public[0]Target Apply with Auto-Approve
Execute changes only on the designated target resource, bypassing manual prompt.
terraform apply -target=module.vpc.aws_subnet.public[0] -auto-approveApply with Variable File
Load environment-specific variables from a tfvars file (e.g. prod.tfvars).
terraform apply -var-file="environments/production.tfvars"Refresh State Only (Check Drift)
Query real-world cloud infrastructure without planning any resource modifications.
terraform plan -refresh-onlyDestroy Specific Target Resource Only
Tear down only the specified cloud resource while leaving the rest intact.
terraform destroy -target=module.vpc.aws_subnet.public[0]List All Resources in State
Output every resource address tracked in the active remote or local state.
terraform state listShow Resource Attributes from State
Inspect all live attributes, IDs, and metadata for a tracked resource.
terraform state show module.vpc.aws_subnet.public[0]Remove Resource from State (Keep Cloud Asset Alive)
Safely un-track a resource from state without running cloud deletion.
terraform state rm module.vpc.aws_subnet.public[0]Move / Rename Resource in State
Update state address after refactoring code, preventing destructive destroy & recreate.
terraform state mv module.vpc.aws_subnet.public[0] module.network.aws_subnet.public[0]Pull Raw State JSON to Terminal or File
Export the complete live remote state JSON directly to a local backup file.
terraform state pull > terraform.tfstate.backupRelease Stuck State Lock
Manually remove a lingering state lock left behind by a killed or timed-out process.
terraform force-unlock -force 8a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5dImport Existing Cloud Resource
Link an existing unmanaged cloud resource to your Terraform/OpenTofu code.
terraform import module.vpc.aws_subnet.public[0] i-0123456789abcdef0Format All Code Files Recursively
Standardize syntax, indentation, and alignment across all .tf and .tfvars files.
terraform fmt -recursiveValidate Configuration Syntax
Verify that configuration files are syntactically valid and internally consistent.
terraform validateExport Dependency Graph as PNG Image
Render visual dependency relationships between resources using Graphviz dot.
terraform graph | dot -Tpng -o graph.pngView Output Values
Extract all declared output values (IPs, endpoints, ARNs) from current state.
terraform outputRelated Infrastructure & Cloud Utilities
CLI commands and Rosetta Stone for AWS, Google Cloud, Azure, and DigitalOcean.
Visual kubectl command generator, short names, and troubleshooting playbooks.
Format, validate, and convert YAML manifests to JSON in your browser.
Visual builder for Git branching, cherry-picking, and emergency undo workflows.
Terraform & OpenTofu Support
Seamlessly switch between HashiCorp Terraform and Linux Foundation OpenTofu commands with 1-click toggle.
State Surgery & Recovery
Safe commands for removing stuck resources, renaming modules with state mv, force-unlocking state, and targeted plans.
100% Client-Side Parameterization
Generates commands locally in browser memory. No cloud credentials, API keys, or state files are ever uploaded.
Frequently Asked Questions
Can I switch between HashiCorp Terraform and Linux Foundation OpenTofu?
How do I remove a resource from state without destroying real cloud infrastructure?
How do I release a stuck state lock caused by a crashed CI/CD runner?
More Dev Tools Utilities
Cron Generator & Expression Parser
Build, parse, and translate cron expressions visually. Features plain-English interpretation, next execution times (Local & UTC), and multi-platform snippets.
JSON Formatter
Format, beautify, minify, and validate JSON instantly. Adjustable indentation with real-time syntax validation and error feedback.
Markdown Preview
Write Markdown and see rendered HTML in real-time. Split-pane editor with copy Markdown/HTML.