DevOps Classroom notes 26/Aug/2026

Terraform Tasks:

  1. create below resources
    1. modules
      1. vm
      2. storage account & container
      3. vmss
      4. image template
    2. use above module and deploy resources
    3. configure backend

create git repo and add all configurtion

name: Azure Terraform Deploy

on:
  push:
    branches:
      - main

jobs:
  terraform:
    runs-on: ubuntu-latest

    steps:
      # Checkout repo
      - name: Checkout
        uses: actions/checkout@v4

      # Setup Terraform
      - name: Setup Terraform
        uses: hashicorp/setup-terraform@v3
        with:
          terraform_version: 1.8.5

      # Azure Login
      - name: Azure Login
        uses: azure/login@v2
        with:
          creds: ${{ secrets.AZURE_CREDENTIALS }}

      # Terraform Init
      - name: Terraform Init
        run: terraform init

      # Terraform Plan
      - name: Terraform Plan
        run: terraform plan -out=tfplan

      # Terraform Apply
      - name: Terraform Apply
        if: github.ref == 'refs/heads/main'
        run: terraform apply -auto-approve tfplan

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%