Skip to content

Macumba Travel Infrastructure

This repository contains the infrastructure code for Macumba Travel, defining cloud resources for multiple providers using Terraform.

🚀 Current Technology Stack

  • Terraform: v1.11.4 (Latest: v1.12.2 - update recommended)
  • Google Cloud Platform (GCP): Primary hosting provider
  • Amazon Web Services (AWS): Secondary/backup provider
  • Cloud Run: Serverless container hosting (GCP)
  • Cloud SQL: Managed PostgreSQL database (GCP)
  • Cloud Build: CI/CD pipeline (GCP)
  • Firebase: Authentication and frontend hosting
  • Docker: Container deployment

Repository Structure

/infra/
  /docs/               # Comprehensive documentation
    /common/           # Provider-agnostic documentation
    /aws/              # AWS-specific documentation
    /gcp/              # GCP-specific documentation
    README.md          # Documentation guide

  /terraform_gcp/      # Google Cloud Platform configuration
    # All GCP Terraform files and environment configuration

  /terraform_aws/      # Amazon Web Services configuration
    # All AWS Terraform files and environment configuration

  /modules/            # Shared Terraform modules
    /env/              # Environment configuration module

Documentation

For detailed information about the infrastructure, please refer to the documentation directory.

Key documentation includes:

Getting Started

Prerequisites

  • Terraform: v1.11.4+ (Latest: v1.12.2 recommended)
  • Install from: https://developer.hashicorp.com/terraform/install
  • GCP Authentication:
  • gcloud CLI configured with appropriate project
  • Service account with necessary permissions
  • AWS Authentication (if using AWS resources):
  • AWS CLI configured with appropriate credentials
  • IAM user with necessary permissions
  • Docker: For local development and testing

Deployment Steps

For GCP (Primary Provider):

cd terraform_gcp
terraform init
terraform plan -var-file=dev.tfvars
terraform apply -var-file=dev.tfvars

For AWS (Alternative Provider):

cd terraform_aws
terraform init
terraform plan -var-file=dev.tfvars
terraform apply -var-file=dev.tfvars

Cloud Provider Implementations

Google Cloud Platform (GCP)

The primary cloud provider, with infrastructure defined in /terraform_gcp/.

Key Resources: - Cloud Run for containerized backend services - Cloud SQL for PostgreSQL database (also used for cost-effective caching) - Cloud Storage for media and static assets - Secret Manager for secure configuration management

Amazon Web Services (AWS)

Alternative cloud provider with equivalent infrastructure defined in /terraform_aws/.

Key Resources: - ECS Fargate for containerized backend services - RDS for PostgreSQL database (also used for cost-effective caching) - S3 for media and static assets - Systems Manager Parameter Store for secure configuration