Back
infrastructure as code terraform triangulation diagram showing desired state, current state, and state file relationships

🧱 What Is Infrastructure as Code (IaC)? A Practical Look with Terraform

Building cloud infrastructure once meant endless clicking through consoles and wizards. Today, engineers use Infrastructure as Code Terraform to describe and automate their environments — reproducible, version-controlled, and fully auditable.

Infrastructure as Code (IaC) changed the way we think about deploying systems. Instead of manually creating VMs, networks, and storage, we define the desired state in configuration files and let tools like Terraform bring that state to life across any cloud. This approach is at the heart of Infrastructure as Code Terraform – where automation, version control, and reusability meet.

In this article, we’ll explore:

  • what Infrastructure as Code really means,

  • how Terraform connects desired state, actual state, and APIs,

  • and how this model works across both Oracle Cloud (OCI) and Microsoft Azure — forming the backbone of multicloud automation.

🧠 From Manual Work to Infrastructure as Code Terraform

IaC means treating your infrastructure like software.
You write a declaration of what should exist — not how to create it.

Terraform reads this declaration, calculates the differences between what you want and what exists, and applies the minimal set of changes required to make both match.

No more configuration drift.
No more guessing what changed in the console at 2 AM.

Your infrastructure becomes predictable, auditable, and repeatable.

📘 Related reading:

⚙️ The Terraform Triangulation: Code, State, and Cloud Reality

One of the most elegant aspects of Terraform is how it triangulates reality — constantly comparing your intent with what’s already deployed in the cloud.
This triangulation is what allows Terraform to stay accurate, idempotent, and predictable across every run.

  1. Your code — defines what the infrastructure should look like (the desired state).

  2. The state file — records what Terraform believes already exists (its internal memory of resources).

  3. The cloud API — reports what’s actually running (the ground truth of current state).

The result is a precise execution plan: the minimal set of API operations required to align your desired state with the actual one.
This closed feedback loop — code ↔ state ↔ reality — is the true essence of Infrastructure as Code.

Figure 1. Terraform Triangulation – the feedback loop between desired state, current state, and the Terraform state file.

☁️ One Language, Two Clouds: OCI and Azure

Whether you work in Oracle Cloud or Azure, Terraform gives you a unified language for provisioning.

Here’s a simple comparison — two different clouds, same logic.

# Oracle Cloud Infrastructure provider
provider "oci" {
  region = "eu-frankfurt-1"
}

resource "oci_core_instance" "foggykitchen_vm_oci" {
  display_name = "fk-oci-demo"
  shape         = "VM.Standard.E5.Flex"
  create_vnic_details {
    subnet_id = var.subnet_id
  }
}

# Azure provider
provider "azurerm" {
  features {}
}

resource "azurerm_linux_virtual_machine" "foggykitchen_vm_azure" {
  name                = "fk-azure-demo"
  resource_group_name = azurerm_resource_group.demo.name
  size                = "Standard_B1s"
  admin_username      = "terraform"
  network_interface_ids = [azurerm_network_interface.demo.id]
}

Two completely different APIs.
One consistent IaC syntax.

This is what makes Terraform such a powerful multicloud orchestrator.

📗 Related deep dives:

🧩 IaC as Software: Store, Reuse, and Evolve

Treating infrastructure as code means you can:

  • store it in GitHub,

  • review it with pull requests,

  • and reuse it through modules.

Your infrastructure becomes a living, versioned system — not a pile of scripts.

This is the philosophy behind my Terraform modules — reusable, production-tested blueprints that you can plug into any OCI or Azure project.

By combining Infrastructure as Code Terraform with GitHub versioning and reusable modules, engineers can manage infrastructure the same way they manage application code. By following this pattern, you can apply Infrastructure as Code Terraform practices consistently across OCI, Azure, or any other cloud provider.

🔗 Explore some examples on GitHub:

🔄 From IaC to CI/CD Pipelines

Once your Terraform code lives in GitHub, the next logical step is automation.
You want to validate, test, and deploy infrastructure changes automatically — the same way we deploy applications.

That’s where the OCI DevOps Service comes in.
It integrates source code, build pipelines, and deployment stages for both applications and Terraform automation.

If you want to see this in action — complete with repositories, triggers, and infrastructure pipelines —
check out the course:
👉 OCI DevOps Service with Terraform (2023 Edition)

🌐 The Multicloud Mindset

Infrastructure as Code isn’t just a technology shift — it’s a mindset.
It frees you from being tied to a single provider and lets you design architectures that span multiple clouds.

Whether it’s:

— the same Terraform patterns apply.

The language stays the same. Only the provider block changes. 

Whether you manage resources in Oracle Cloud or Azure, the same Infrastructure as Code Terraform patterns apply, ensuring portability and consistency across multicloud environments.

🚀 From Concept to Hands-On Practice

Understanding Infrastructure as Code is the first step.
But the real transformation happens when you deploy live environments — compute, networking, storage, security — all automated from code.

That’s exactly what we do in my flagship Terraform course:


OCI Infrastructure Automation with Terraform (2025 Edition)

  • Step-by-step provisioning of production-grade OCI environments

  • Learn modules, remote state, and reusable Terraform patterns

  • Build, version, and automate every layer of cloud infrastructure

👉 Explore the course →

🧭 Closing Thoughts

At FoggyKitchen, we like to say:

“You can’t automate the cloud until you can describe it.”

Infrastructure as Code is that description — a recipe that turns intent into reality. And once you start thinking this way, you’ll never go back to clicking in consoles again. At FoggyKitchen, we treat automation as a craft — and Infrastructure as Code Terraform is the foundation of every recipe we build across OCI and Azure.


🧩 Related posts and resources:

Leave A Reply

🚀 Take Full Control of Your Cloud Journey

Start with the flagship course — automate Oracle Cloud Infrastructure with Terraform/OpenTofu.
💡 Gain hands-on expertise in IaC from zero to production.
⚡ Learn real-world architectures you can reuse instantly.