Flashcards · Terraform · Free
Terraform flashcards, generated for you.
Example Terraform study cards to learn from right now — then generate a full set from your own notes (plus a practice quiz) and export to Quizlet or Anki. Free, no account needed.
Example Terraform flashcards
What is Terraform and what problem does it solve?
Terraform is an Infrastructure as Code (IaC) tool by HashiCorp that enables you to define, provision, and manage cloud infrastructure declaratively across multiple providers using HCL configuration files, eliminating manual console clicks and ensuring reproducible infrastructure.
What are the three main Terraform file types and their purposes?
1) .tf files: contain resource, variable, and output declarations; 2) terraform.tfvars: stores variable values; 3) .tfstate: tracks infrastructure state (DO NOT edit manually)
Explain the difference between 'terraform plan' and 'terraform apply'
'terraform plan' shows a preview of changes that will be made without modifying infrastructure; 'terraform apply' executes the plan and provisions/modifies actual resources
What does 'terraform init' do?
'terraform init' initializes a Terraform working directory by downloading provider plugins, setting up the backend, and preparing the environment for use. Must run this before any other terraform commands.
What is terraform state and why is it critical?
State is a JSON file (terraform.tfstate) that tracks the current configuration of managed resources. It's critical because Terraform uses it to map your configuration to real infrastructure and determine what changes are needed. Losing it risks duplicating resources.
What is the purpose of 'terraform import' and when would you use it?
'terraform import' brings existing infrastructure (created outside Terraform) under Terraform management by creating a resource binding in state. Use it when adopting Terraform for legacy infrastructure without rebuilding resources.
Describe the difference between local and remote state backends.
Local state stores terraform.tfstate on your machine (default, unsafe for teams); remote state stores state in centralized backends (S3, Terraform Cloud, Azure Storage) enabling team collaboration, locking, and security.
What does 'terraform destroy' do and what precaution should you take?
'terraform destroy' tears down all infrastructure defined in your configuration by removing resources from the cloud provider. Always run 'terraform plan -destroy' first to review what will be deleted and use approval workflows in production.
What is a Terraform module and when should you create one?
A module is a reusable package of Terraform configurations (with inputs/outputs) organized in a directory. Create modules to standardize deployments, reduce code duplication, and encapsulate infrastructure patterns (e.g., a VPC module, RDS module).
Explain the terraform workflow and the role of tfvars and tfstate in production deployments.
Workflow: init → plan → apply → destroy. In production: store tfvars securely (secrets manager, not git); use remote state with locking/encryption; enable state versioning; apply changes through CI/CD pipelines (Terraform Cloud, GitHub Actions) to ensure approval gates and auditability.
Make your own Terraform study set
Flashcards for related topics
Studying Terraform to build with AI? MindloomHQ turns it into real skills — structured courses, agent projects, and certificates.
Explore MindloomHQ →