Skip to content

Commit

Permalink
Update validation pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ingvar-goryainov authored Jul 19, 2024
1 parent baa943b commit e6da67c
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/terraform-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ on:
pull_request:
branches:
- main
push:
branches:
- main

workflow_dispatch:

permissions:
id-token: write
contents: read
issues: write

env:
ARM_CLIENT_ID: "${{ secrets.AZURE_CLIENT_ID }}"
ARM_SUBSCRIPTION_ID: "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
ARM_TENANT_ID: "${{ secrets.AZURE_TENANT_ID }}"

jobs:
terraform_validate:
name: "Format and Validate Code"
Expand All @@ -21,10 +27,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Terraform
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.8.4

- name: Check resource group configuration
run: |
Expand Down Expand Up @@ -109,15 +113,8 @@ jobs:
- name: Terraform Fmt
run: terraform fmt -check -recursive -diff

- name: Log in to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Terraform Init
run: terraform init
run: terraform init -backend=false

- name: Terraform Validate
run: terraform validate

0 comments on commit e6da67c

Please sign in to comment.