Pcornel
Virtualization · Automation

Infrastructure as Code

Cheat sheet · https://pcornel.dk/topic.php?topic=3685

Back to the Topic

Answer

Infrastructure as Code declares VMs, networks and storage in versioned files (Terraform, Pulumi, Bicep, Ansible), so changes are reviewed, planned and applied consistently, and drift from the declared state can be detected.

Remember

  • The plan is the review; read it.
  • Manual changes become drift.
  • State files contain secrets; protect them.

First checks

  • terraform plan — drift and changes
  • ansible-playbook site.yml --check --diff — config drift
  • git log — reviewed changes

Verify in this order

code → plan → review → apply → state

Where it usually breaks

First mismatch in management intent → host/cluster capability → hypervisor runtime/task → virtual resource/device → guest state → workload-visible read-back; preserve identity/native error/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3685

Confirmation

Confirm action

Continue?