Daily snapshot: 2025-11-13
This commit is contained in:
@@ -0,0 +1,68 @@
|
|||||||
|
name: Terraform CI/CD
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
terraform:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
|
||||||
|
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
|
||||||
|
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
|
||||||
|
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Terraform
|
||||||
|
uses: hashicorp/setup-terraform@v2
|
||||||
|
|
||||||
|
- name: Terraform Init (Dev)
|
||||||
|
run: |
|
||||||
|
cd environments/dev
|
||||||
|
terraform init
|
||||||
|
continue-on-error: false
|
||||||
|
|
||||||
|
- name: Terraform Plan (Dev)
|
||||||
|
run: |
|
||||||
|
cd environments/dev
|
||||||
|
terraform plan -out=dev.plan
|
||||||
|
continue-on-error: false
|
||||||
|
|
||||||
|
- name: Terraform Apply (Dev)
|
||||||
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||||
|
run: |
|
||||||
|
cd environments/dev
|
||||||
|
terraform apply dev.plan
|
||||||
|
continue-on-error: false
|
||||||
|
|
||||||
|
- name: Terraform Init (Prod)
|
||||||
|
run: |
|
||||||
|
cd environments/prod
|
||||||
|
terraform init
|
||||||
|
continue-on-error: false
|
||||||
|
|
||||||
|
- name: Terraform Plan (Prod)
|
||||||
|
run: |
|
||||||
|
cd environments/prod
|
||||||
|
terraform plan -out=prod.plan
|
||||||
|
continue-on-error: false
|
||||||
|
|
||||||
|
- name: Terraform Apply (Prod)
|
||||||
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||||
|
run: |
|
||||||
|
cd environments/prod
|
||||||
|
terraform apply prod.plan
|
||||||
|
continue-on-error: false
|
||||||
|
|
||||||
|
- name: Terraform Validate
|
||||||
|
run: |
|
||||||
|
cd environments/dev
|
||||||
|
terraform validate
|
||||||
|
cd ../prod
|
||||||
|
terraform validate
|
||||||
@@ -1,12 +1,6 @@
|
|||||||
# Terraform Azure Bootcamp
|
# Aiimi Data CoP Azure Sandbox Environment
|
||||||
|
|
||||||
|
|
||||||
This repo contains hands-on Terraform projects on Azure, following a structured learning path:
|
|
||||||
1. Foundations (VM, Virtual Network)
|
|
||||||
1. Modules
|
|
||||||
1. Remote State & Environments
|
|
||||||
1. Scaling & Advanced Patterns
|
|
||||||
1. Security & Testing
|
|
||||||
1. Production-Ready 3-Tier Architecture
|
|
||||||
|
|
||||||
## 📂 Structure
|
## 📂 Structure
|
||||||
- `modules/` → reusable Terraform modules (network, compute, database, etc.)
|
- `modules/` → reusable Terraform modules (network, compute, database, etc.)
|
||||||
|
|||||||
Reference in New Issue
Block a user