Infrastructure as code (IaC)
Slide deck explaining Infrastructure as Code (IaC): defines cloud infrastructure in machine-readable files for repeatable deployments. Covers why IaC exists (stopping drift), consistency/repeatability, automation/version control, declarative vs imperative, ARM templates vs Bicep, and practical use cases.

Infrastructure as code (IaC)
Introduction to Infrastructure as Code (IaC): defines cloud infrastructure in machine-readable files for repeatable deployments.
Infrastructure as code (IaC)
Introduction to Infrastructure as Code (IaC): defines cloud infrastructure in machine-readable files for repeatable deployments.
Infrastructure as Code (IaC): the core idea
IaC defines cloud infrastructure in machine-readable files, so you can deploy the same environment repeatedly. Infrastructure described as files (templates/definitions). Replace 'portal clicks' with repeatable deployments. Fewer surprises between dev, test, and prod.
Why IaC exists: stopping drift
Manual setup is hard to repeat perfectly, so environments slowly become different. Small differences accumulate across dev/test/prod. Drift causes 'works here, fails there' incidents. IaC redeploys from one shared definition.
Consistency and repeatability
The same IaC definition produces the same environment, again and again. Consistency: environments match each other. Repeatability: rebuild without manual memory. Fewer 'surprise differences' during releases.
Automation + version control
IaC definitions can be automated and tracked like code. Deploy as part of a pipeline (repeatable process). Review changes and track history in version control. Roll back by redeploying a known-good definition.
Declarative vs imperative
Declarative says what you want; imperative says how to do it step by step. Declarative: describe the desired end state. Imperative: describe steps and sequence. Azure IaC is commonly declarative (reusable definition).
ARM vs templates vs Bicep
ARM is the deployment layer; templates and Bicep are the IaC definitions. Azure Resource Manager (ARM) equals deployment/management layer. ARM templates equals definition files you deploy. Bicep equals another way to write the definition.
ARM templates (JavaScript Object Notation (JSON))
ARM templates are JSON files that describe what you want Azure to deploy. Machine-readable definition files (JSON). Describe resources and configuration as a desired state. Deployed through Azure Resource Manager (ARM).
Bicep (Domain-Specific Language (DSL))
Bicep is a DSL that compiles into JSON ARM templates for deployment. Cleaner authoring compared to raw JSON templates. Compiles/transpiles into ARM template JSON. Still deployed through Azure Resource Manager (ARM).
Practical use: rebuilds and fast environment setup
IaC makes it easy to recreate environments reliably from versioned files. Redeploy from the same definition to rebuild quickly. Reduce 'surprise differences' across environments. Automation does not equal IaC (IaC requires reusable definitions in files).
Pitfalls
IaC is about versioned, reusable definitions of desired state—don't confuse the tools or the goal. Pitfall: 'IaC is just scripts' to IaC is reusable desired-state definitions. Pitfall: 'IaC is only for a VM (Virtual Machine (VM))' to it can define full environments. Pitfall: 'ARM equals templates/Bicep' to ARM is the layer; templates/Bicep are inputs.
