Skip to content

Update workflows to use Azure Login action instead of custom script #217

Update workflows to use Azure Login action instead of custom script

Update workflows to use Azure Login action instead of custom script #217

Workflow file for this run

name: CI
on:
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
validate:
name: Terraform Validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
env:
TERRAFORM_WRAPPER: false # when enabled JSON output of Terraform Plan is not properly parsed
with:
terraform_version: ${{ vars.TERRAFORM_VERSION }}
terraform_wrapper: ${{ env.TERRAFORM_WRAPPER }}
- name: Ensure code is formatted
run: terraform fmt -diff -check -recursive
- name: Terraform Init
run: terraform init -backend=false
- name: Terraform Validate
run: terraform validate
- name: Setup TFLint
uses: terraform-linters/setup-tflint@v4.0.0
- name: Run TFLint
run: |
tflint --init
tflint --format compact
- name: Pull Checkov image
run: docker pull bridgecrew/checkov:latest
- name: Scan code with Checkov
run: |
docker run \
--name test-container \
--tty \
--rm \
--volume $(pwd):/tf bridgecrew/checkov:latest \
--directory /tf \
--framework terraform \
--check CKV_AZURE* \
--soft-fail