5 exercises on infrastructure as code patterns vocabulary.
0 / 5 completed
1 / 5
What is the core principle of Infrastructure as Code (IaC)?
IaC: infrastructure (servers, networks, databases) is described in code files that are versioned, reviewed, and applied automatically. This enables reproducibility, auditability, and treating infrastructure with the same rigor as application code.
2 / 5
What is idempotency in the context of IaC?
Idempotent IaC: running terraform apply or ansible-playbook on already-converged infrastructure makes no changes. You can safely re-apply to fix drift or add resources without worrying about duplicating existing ones.
3 / 5
What is configuration drift?
Configuration drift: when engineers make manual changes (hotfixes, console clicks) outside the IaC workflow, infrastructure diverges from the code. IaC tools detect and reconcile drift; drift also signals process problems.
4 / 5
What is a Terraform state file?
Terraform state: Terraform stores the mapping between resource declarations and actual cloud resources (e.g., which aws_instance maps to i-1234). On plan, it compares current state to desired, showing what would change.
5 / 5
What is the difference between imperative and declarative IaC?
Declarative vs imperative: Terraform and Pulumi (declarative) say "I want 3 EC2 instances"; the tool calculates the diff. Ansible playbooks can be either; shell scripts are fully imperative. Declarative IaC is self-documenting and idempotent by nature.