Infrastructure as Code
IaC means your infrastructure is declared in files, version-controlled, reviewed, and applied repeatably - not clicked together in the console. The console is fine for learning and one-offs; anything reproducible or auditable should be code.
Console changes are manual, unreviewable, and drift-prone - you can't diff them, peer review them, or reliably recreate the environment. IaC gives version history, code review, and identical dev/stage/prod. If a question stresses "repeatable / reviewable / consistent across environments," the answer is IaC, not clicking.
What IaC solves
The rise of cloud demand drove a cultural shift - DevOps - that emphasizes collaboration between developer and operations teams and automates software delivery and infrastructure changes. As those environments grow, DevOps teams hit four recurring challenges that IaC directly targets.
Benefits of IaC
The auditable benefit is why IaC beats the console: unlike raw infrastructure, code carries comments explaining why a change was made, and a preview lets you detect drift before applying. Version control gives collaborative ownership - a developer needing a firewall port opens a pull request instead of waiting in a queue for an admin.
- Build reusable modules that encapsulate conventions, then deploy many instances of the same template across applications or regions instead of rebuilding by hand.
- Google publishes vetted modules in the Cloud Foundation Toolkit - documented, tested infrastructure code you adopt rather than write from scratch.
Imperative vs declarative
Most programming is imperative - you spell out the exact steps ("create five servers"). That breaks for infrastructure: re-run the script and it may create five more servers, because it can't tell live state from desired state. IaC is declarative - you state the end result and the tool reconciles reality to match it.
Delete one of the five servers by hand and the next run restores just the missing one - it sees four exist and adds one, not five. Imperative re-runs can't make that distinction, so they repeatedly recreate resources. Declarative management focuses on the WHAT, not the HOW.
Provisioning vs configuration management
These two terms get conflated. IaC provisions cloud resources (create the VM, the network, the GKE cluster); configuration management handles what runs inside them (OS packages, services, dependencies, updates). IaC frameworks manipulate Google Cloud APIs; config management handles package configuration and software maintenance.
GCP supports several IaC tools - Chef, Puppet, Ansible, and Packer - but Terraform is the first-class, focus tool and the exam's default.
Terraform - the default answer
Terraform (HashiCorp) is the go-to IaC tool on GCP: declarative HCL, a state file
tracking real resources, plan to preview, apply to converge. It's cloud-agnostic and
the exam's default "provision infrastructure as code" answer.
Its five-phase workflow and the init/plan/apply/fmt/destroy
commands are the hands-on tool that
implements everything on this page.
Infrastructure Manager
Infrastructure Manager (also called Infra Manager) is a managed service that automates the deployment and management of Google Cloud infrastructure resources. You define the infrastructure in Terraform, and Infra Manager deploys it onto Google Cloud for you - so you get Infrastructure as Code without running the Terraform workflow yourself.
Infrastructure Manager does not manage the deployment of applications onto your resources. To deploy applications, use products like Cloud Build and Cloud Deploy, third-party tools, or your own toolchain. If a question pairs Infra Manager with "deploy the app," that is the wrong tool - Infra Manager stops at provisioning the infrastructure.
Config Connector
Config Connector manages GCP resources as Kubernetes objects - you kubectl apply
YAML and a controller in the cluster reconciles the real GCP resources. The answer for
teams that want to manage infra the Kubernetes / GitOps way. It underpins Config
Sync in Anthos/GKE fleet management.
Helm for GKE
Helm is the package manager for Kubernetes - it templates and versions
application manifests into installable charts (helm install, helm upgrade). Scope:
deploying apps into a GKE cluster, not provisioning the cluster or cloud resources
themselves.
Recap
kubectl / GitOps→Config Connector