# Planfile > Planfile is an iPhone app for learning HashiCorp Terraform: short lessons, hands-on Labs that run terraform init, plan, apply, state and other commands against a simulated cloud on the phone, and original practice questions for the HashiCorp Certified: Terraform Associate (004) exam. Chapters 1-2 are free; a one-time $14.99 purchase (US) unlocks everything. No account, no cloud credentials. - App Store: https://apps.apple.com/app/planfile/id6838105842 - Made by Cloudconcur Ltd. Planfile is an independent study app, not affiliated with or endorsed by HashiCorp or IBM. Terraform is a trademark of HashiCorp. ## Pages - [Terraform vs Ansible: what's the difference, and when to use each](https://planfile.app/compare/terraform-vs-ansible): Terraform vs Ansible compared: provisioning vs configuration management, state, HCL vs YAML, the same EC2 and nginx task in both, and using them together. - [Terraform vs CloudFormation: differences, examples and when to choose each](https://planfile.app/compare/terraform-vs-cloudformation): Terraform vs AWS CloudFormation: multi-cloud vs AWS-only, HCL vs YAML, state files vs stacks, plans vs change sets, drift, cost, and one S3 bucket in both. - [Terraform vs OpenTofu: what changed, what's compatible, and which to use](https://planfile.app/compare/terraform-vs-opentofu): Terraform vs OpenTofu explained: the 2023 licence change and fork, what's compatible, features unique to each, what the BUSL means for you, and how to migrate. - [Pulumi vs Terraform: what's different, with the same bucket in both](https://planfile.app/compare/terraform-vs-pulumi): Pulumi vs Terraform compared: general-purpose languages vs HCL, state backends, providers, testing, licences, the same S3 bucket in both, and when to pick each. - [terraform apply and terraform destroy: how they work and how to use them safely](https://planfile.app/guides/terraform-apply-destroy): How terraform apply and terraform destroy work: approval, saved plans, -auto-approve, -target, partial failures, and how to destroy one specific resource. - [Terraform drift: how to detect it and how to fix it](https://planfile.app/guides/terraform-drift): What Terraform drift is, how terraform plan reports changes made outside Terraform, and how to revert them or keep them with apply -refresh-only. - [terraform fmt and terraform validate: format and check your code](https://planfile.app/guides/terraform-fmt-validate): How terraform fmt formats code (-recursive, -check, -diff) and what terraform validate checks and doesn't, with real errors, CI setup and pre-commit hooks. - [Terraform for_each and count: loops, conditionals and dynamic blocks](https://planfile.app/guides/terraform-for-each-count): Terraform for_each vs count with examples: count.index, each.key and each.value, toset(), conditional resources, for expressions and dynamic blocks. - [Terraform functions: a practical guide with examples](https://planfile.app/guides/terraform-functions): Terraform built-in functions with examples and results: format, replace, merge, lookup, zipmap, cidrsubnet, templatefile, try, plus terraform console. - [terraform import: bring existing resources under Terraform](https://planfile.app/guides/terraform-import): How to import existing resources into Terraform with import blocks and -generate-config-out, the legacy terraform import command, and an S3 bucket example. - [terraform init: what it does and the options you'll need](https://planfile.app/guides/terraform-init): What terraform init does, when to run it again, and how -upgrade, -reconfigure, -migrate-state and -backend-config work, with fixes for common init errors. - [Terraform lifecycle rules, depends_on and custom conditions](https://planfile.app/guides/terraform-lifecycle): Every Terraform lifecycle argument with examples: create_before_destroy, prevent_destroy, ignore_changes, replace_triggered_by, depends_on and conditions. - [Terraform modules: how to write, call and version them](https://planfile.app/guides/terraform-modules): How Terraform modules work: root vs child modules, file structure, calling a module from a path, registry or Git, versions, outputs and best practices. - [Terraform moved block: rename resources and refactor modules without destroying anything](https://planfile.app/guides/terraform-moved-block): How Terraform moved blocks rename resources, move them into modules or from count to for_each without destroying them, and how they compare to state mv. - [terraform plan: what it does and how to read the output](https://planfile.app/guides/terraform-plan): What terraform plan does, how to read its symbols (+, ~, -, -/+), why a change forces replacement, and how to save a plan with -out and apply it. - [Terraform providers: required_providers, the AWS provider, aliases and data sources](https://planfile.app/guides/terraform-providers): How Terraform providers work: required_providers, version constraints, the lock file, configuring and authenticating the AWS provider, aliases and data sources. - [Terraform state: the state file, backends, locking and state commands](https://planfile.app/guides/terraform-state): What the Terraform state file holds, how to keep it in an S3 backend with locking, force-unlock, and the terraform state list, show, mv and rm commands. - [terraform taint, untaint and apply -replace: force a resource to be recreated](https://planfile.app/guides/terraform-taint-replace): Why terraform taint is deprecated, how to force a resource to be replaced with terraform apply -replace, how untaint works and when Terraform taints on its own. - [Terraform variables, locals and outputs: a complete guide](https://planfile.app/guides/terraform-variables-outputs): Terraform input variables, types, validation, tfvars and precedence, locals, outputs and the terraform output command (-json, -raw), with copyable HCL. - [Terraform workspaces: CLI commands, state per workspace and HCP Terraform workspaces](https://planfile.app/guides/terraform-workspaces): Terraform workspace commands (new, select, list, show, delete), terraform.workspace, state per workspace, when not to use them, and HCP Terraform workspaces. - [Terraform certification: the HashiCorp Terraform Associate (004) guide](https://planfile.app/terraform-associate-certification): HashiCorp Certified: Terraform Associate (004): exam format, cost, every objective with study links, changes from 003, a 4-week study plan and exam-day tips. - [Terraform Associate practice exam: 15 questions with answers](https://planfile.app/terraform-associate-practice-questions): 15 free Terraform Associate (004) practice questions with answers and explanations, covering providers, workflow, variables, state and modules. No exam dumps. - [Terraform commands: the complete cheat sheet](https://planfile.app/terraform-commands): Every Terraform CLI command you need, grouped and explained with examples: init, plan, apply, state, workspaces, import, console, test and TF_LOG logging. - [Terraform labs: where and how to practise Terraform hands-on](https://planfile.app/terraform-labs): How to practise Terraform hands-on, with or without a cloud: local providers, LocalStack, sandbox accounts, 10 practice exercises and Planfile's 26 Labs. - [Terraform tutorial: from install to destroy, step by step](https://planfile.app/terraform-tutorial): A step-by-step Terraform tutorial for beginners: install Terraform, write an AWS S3 config, then init, plan, apply, update, replace, add variables and destroy. - [What is Terraform? What it does, how it works and what it is used for](https://planfile.app/what-is-terraform): What Terraform is, what it is used for and how it works: HCL, providers, state and the init, plan, apply workflow on AWS, Azure and GCP, with a real example. ## Site - [Guides](https://planfile.app/guides) - [Videos](https://planfile.app/videos) - [Support](https://planfile.app/support) - [Privacy](https://planfile.app/privacy)