Shashi Vashisht
π GitHub: https://github.com/devopsgeek1979
π LinkedIn: https://www.linkedin.com/in/shashi-pal1979/
This project demonstrates a production-style multi-cloud infrastructure deployment using Terraform across:
- βοΈ AWS β VPC, Subnet, EC2
- βοΈ Azure β Resource Group, VNet, Subnet
It also includes:
- Remote backend (state management)
- State locking (DynamoDB)
- CI/CD pipeline using GitHub Actions
- Clean Git workflow for deployment
Terraform
β
βββ AWS (VPC + EC2)
β βββ Remote State β S3 + DynamoDB
β
βββ Azure (VNet + Subnet)
βββ Remote State β Azure Storage
multi-cloud-terraform-devops-platform/
β
βββ terraform/
β βββ aws/
β β βββ backend.tf
β β βββ provider.tf
β β βββ main.tf
β β βββ variables.tf
β β
β βββ azure/
β β βββ backend.tf
β β βββ provider.tf
β β βββ main.tf
β β βββ variables.tf
β
βββ .github/workflows/
β βββ terraform.yml
β
βββ .gitignore
βββ README.md
Ensure the following tools are installed:
- Terraform β₯ 1.3
- AWS CLI
- Azure CLI
- Git
export AWS_ACCESS_KEY_ID=<your-access-key>
export AWS_SECRET_ACCESS_KEY=<your-secret-key>
export AWS_DEFAULT_REGION=ap-south-1Verify:
aws sts get-caller-identityaz loginVerify:
az account showaws s3api create-bucket \
--bucket my-terraform-state-bucket \
--region ap-south-1
aws dynamodb create-table \
--table-name terraform-locks \
--attribute-definitions AttributeName=LockID,AttributeType=S \
--key-schema AttributeName=LockID,KeyType=HASH \
--billing-mode PAY_PER_REQUESTaz group create --name tf-rg --location centralindia
az storage account create \
--name tfstateaccount \
--resource-group tf-rg \
--location centralindia \
--sku Standard_LRS
az storage container create \
--name tfstate \
--account-name tfstateaccountcd terraform/aws
terraform init
terraform validate
terraform plan
terraform apply -auto-approve- VPC
- Subnet
- EC2 Instance
aws ec2 describe-images --owners amazon \
--filters "Name=name,Values=amzn2-ami-hvm-*" \
--query 'Images[*].[ImageId,Name]' \
--output tableUpdate AMI in main.tf if needed.
cd terraform/azure
terraform init
terraform validate
terraform plan
terraform apply -auto-approve- Resource Group
- Virtual Network
- Subnet
Workflow file:
.github/workflows/terraform.yml
- Runs on push to
main - Initializes Terraform for AWS & Azure
- Validates configuration
- Push repo to GitHub
- Go to Actions tab
- Workflow runs automatically
rm -rf .git
git init
git add .
git commit -m "Initial commit - multi-cloud terraform with remote backend"
git remote add origin https://github.com/devopsgeek1979/terraform-basic.git
git branch -M main
git push -u origin main --forcecd terraform/aws
terraform destroy -auto-approvecd terraform/azure
terraform destroy -auto-approveFor production environments:
- Use IAM Roles instead of static keys
- Use AWS Secrets Manager / Azure Key Vault
- Enable Terraform remote backend (already done)
- Enable state locking (DynamoDB)
- Avoid committing secrets
- Multi-cloud Terraform deployment
- Remote state management
- State locking mechanism
- CI/CD pipeline integration
- Infrastructure automation best practices
-
Terraform modules (reusable components)
-
Workspaces (dev/stage/prod)
-
Load Balancers + Auto Scaling
-
Kubernetes:
- EKS (AWS)
- AKS (Azure)
-
Monitoring (Prometheus + Grafana)
-
GitOps (ArgoCD)
This repository demonstrates real-world DevOps practices including:
β Multi-cloud architecture β Infrastructure as Code β CI/CD automation β Remote state management
It is designed to showcase hands-on DevOps engineering capability at scale.