Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 1.15 KB

File metadata and controls

36 lines (29 loc) · 1.15 KB

This workflow automatically run a terraform plan command for the PR and for the master and generate a comparison between them. It utilizes the workflows defined in .github/workflows/tf-pr-checks.yaml.

Features

  • Make it easy to decide the new tag version.
  • Compare the terraform plan from PR created and from Master branch
  • Add as much as directory to make a comparison.

Usage

This workflow triggers automatically on PR creation and generate a comparison of the terraform plan between the PR and Master

Example Implementation

name: Terraform Plan PR Diff
on:
  pull_request:
    branches:
      - master
    paths:
      - 'examples/complete/**'

jobs:
  complete-example:
    uses: clouddrove/github-shared-workflows/.github/workflows/tf-pr-checks.yaml@v2
    with:
      provider: 'azurerm'
      terraform_directory: 'examples/complete'
      target_branch: 'master'
    secrets:
      AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
      ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}