Chapter 1
Cloud Architecture
Course: Comptia Cloud Cv0 004
Subject: Comptia Cloud Cv0004
Chapter: Deployment
1. Infrastructure as Code (IaC)
Definition
Infrastructure as Code is the process of managing and provisioning computing infrastructure using machine-readable configuration files, rather than through manual processes. It enables automation, versioning, and repeatability of infrastructure deployments.
There are two primary IaC approaches:
- Declarative: Specify what resources are needed (e.g., Terraform, CloudFormation).
- Imperative: Define how to create the resources (e.g., Pulumi with Go or Python).
Key Benefits
- Consistency: Avoids configuration drift across environments (e.g., dev, staging, prod).
- Scalability: Automates provisioning across hundreds/thousands of resources.
- Auditability: Code can be versioned and reviewed just like application code.
- Speed: Rapid environment creation for testing, scaling, or disaster recovery.
Popular IaC Tools and Technologies
| Tool | Language | Description | | Terraform | HCL (HashiCorp Configuration Language) | Cloud-agnostic, modular IaC tool for declarative infrastructure provisioning. | | AWS CloudFormation | JSON / YAML | AWS-native tool for declaratively managing AWS resources. | | Azure ARM Templates | JSON | Used for deploying Azure resources using declarative templates. | | Pulumi | Python, TypeScript, Go, etc. | Offers IaC with imperative languages for enhanced logic and reuse. |