Skip to content

add verify prod and refactor terraform check/deploy #468

add verify prod and refactor terraform check/deploy

add verify prod and refactor terraform check/deploy #468

Workflow file for this run

# Copyright 2024 Chainguard, Inc.
# SPDX-License-Identifier: Apache-2.0
name: terraform-lint-validate
on:
push:
branches:
- main
pull_request:
jobs:
terraform-lint-validate:
runs-on: ubuntu-latest
strategy:
matrix:
terraform-dir:
- ./iac/bootstrap
- ./iac
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # v3.1.1
- run: terraform fmt -check
- run: cp "$GITHUB_WORKSPACE/.github/testdata/backend_override.tf" "$GITHUB_WORKSPACE/${{ matrix.terraform-dir }}"
- working-directory: ${{ matrix.terraform-dir }}
run: |
terraform init
terraform validate