Skip to content

Repository files navigation

🌍 Terraform Multi-Cloud Infrastructure Project

Stack: Terraform · AWS · Azure · GCP · GitHub Actions (CI/CD)


Terraform
CI/CD
License: MIT
Made with ❤️

Cloud Providers:
AWS
Azure
GCP

Languages & Tools:
HCL
GitHub Actions


📌 Project Overview

This project demonstrates how to manage multi-cloud infrastructure using Terraform with modular design, environment isolation, and a CI/CD-driven governance workflow.

The goal: Provision & manage resources across AWS, Azure, and GCP while enforcing automation, reusability, and collaboration best practices.


🏗️ Architecture

Architecture Diagram

Layers

  1. Foundational Layer

    • Base network setup (base-network/) across clouds
    • Global variables (global-variables.tf) for naming, tags, and standards
  2. Abstraction Layer

    • Reusable modules:

      • aws_vm/ → EC2 instances
      • azure_storage/ → Storage accounts
      • gcp_vm/ → GCE instances
  3. Deployment & Governance Layer

    • Environments: dev/, staging/, prod/

    • CI/CD pipeline via GitHub Actions:

      • Plan → Pull request validation
      • Apply → Triggered on main branch merge

📂 Repository Structure

terraform-multicloud/
├── backend.tf              # Remote backend config
├── base-network/           # Shared base networking setup
├── docs/                   # Documentation & diagrams
├── envs/                   # Dev, staging, prod environment configs
├── modules/                # Cloud-specific reusable modules
│   ├── aws_vm/
│   ├── azure_storage/
│   └── gcp_vm/
├── global-variables.tf     # Shared tagging & standards
├── provider.tf             # Multi-cloud provider setup
├── versions.tf             # Terraform version constraints
└── .github/workflows/      # CI/CD pipeline

⚙️ Setup & Usage

1️⃣ Clone Repo

git clone https://github.com/your-username/terraform-multicloud.git
cd terraform-multicloud

2️⃣ Configure Backend & Secrets

  • Setup remote state in AWS S3, GCS, or Azure Blob (see backend.tf).

  • Store cloud credentials in GitHub Actions secrets:

    • AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
    • AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID, AZURE_SUBSCRIPTION_ID
    • GOOGLE_CREDENTIALS (JSON service account)

3️⃣ Deploy Infrastructure

Run Terraform manually (for testing):

cd envs/dev
terraform init
terraform plan
terraform apply

Or via GitHub Actions (preferred):

  • Open a PR → triggers terraform plan
  • Merge to main → triggers terraform apply

🔒 Governance & Security

  • CI/CD pipeline enforces code review (Plan stage).
  • Environment isolation ensures dev/staging/prod separation.
  • Secrets managed in GitHub instead of hardcoded credentials.
  • Remote state backend prevents drift & enables team collaboration.

📈 Outcomes

  • Unified way to manage AWS, Azure, and GCP with a single codebase.
  • Reduced manual cloud management → faster deployments.
  • Improved security via GitHub Secrets + remote state backends.
  • Reusable modules make it easy to scale & extend.

✅ Skills Demonstrated

  • Multi-cloud Terraform provisioning
  • Infrastructure modularization
  • GitHub Actions for IaC CI/CD
  • Environment isolation & governance
  • Cloud provider interoperability

🧑‍💻 Author

Abdulrahman A. Muhamad DevOps · Cloud · SRE Enthusiast

🔗 LinkedIn | GitHub | Portfolio

About

Infrastructure as Code (IaC) project that provisions and manages resources across AWS, Azure, and GCP using Terraform. Designed with modular architecture, environment isolation (dev, staging, prod), and CI/CD automation (GitHub Actions). A hands-on project demonstrating multi-cloud strategy, reusable Terraform modules, and governance workflows.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages