diff --git a/.github/workflows/terrafrom.yaml.disabled b/.github/workflows/terrafrom.yaml.disabled new file mode 100644 index 0000000..6642018 --- /dev/null +++ b/.github/workflows/terrafrom.yaml.disabled @@ -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 \ No newline at end of file diff --git a/README.md b/README.md index 3c627e3..5915294 100644 --- a/README.md +++ b/README.md @@ -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 - `modules/` → reusable Terraform modules (network, compute, database, etc.)