Infrastructure as Code Flashcards
6 cards from real DevOps practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 6 Infrastructure as Code flashcards as text
What is a Terraform 'module'?
Answer: A reusable, self-contained package of Terraform configuration that encapsulates resources
Terraform modules bundle related resources into reusable, parameterized packages that can be shared across projects and teams.
What does 'idempotency' mean in the context of IaC tools like Ansible?
Answer: Running the same operation multiple times produces the same result without unintended side effects
Idempotency means you can run a playbook or Terraform apply multiple times and the end state will always be the same desired state without duplicate or unexpected changes.
What is AWS CloudFormation?
Answer: An AWS-native IaC service that provisions resources using JSON or YAML templates
AWS CloudFormation allows you to model and provision AWS infrastructure resources using declarative JSON or YAML templates called stacks.
What is the difference between mutable and immutable infrastructure?
Answer: Mutable infrastructure is updated in place; immutable infrastructure is replaced entirely for each change
Mutable infrastructure is modified after deployment (e.g., patching), while immutable infrastructure is never modified — new images or instances are created and old ones destroyed.
What is 'configuration drift' in infrastructure management?
Answer: When the actual state of infrastructure diverges from the declared desired state
Configuration drift occurs when manual changes, failed applies, or external modifications cause real infrastructure to diverge from what IaC defines.
What is a Terraform 'workspace'?
Answer: An isolated state environment that allows multiple deployments from the same configuration
Terraform workspaces allow you to maintain separate state files for different environments (dev, staging, prod) using the same configuration codebase.