Skip to content

GitHub Action to summarize a Terraform plan file and add it to the Job Summary

Notifications You must be signed in to change notification settings

vivantehealth/terraform-plan-summary-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

terraform-plan-summary-action

Suggested use:

jobs:
  run:
    name: Run
    runs-on: ubuntu-latest
    steps:
      - name: Terraform plan
        run: |
          terraform plan -out=tf.planfile
      - name: Write JSON plan file
        id: json-plan
        # from https://github.com/hashicorp/setup-terraform/issues/20
        # terraform_wrapper adds GH-related text to stdout (debug, outputs, etc.)
        # use the non-wrapped binary instead
        run: |
          terraform-bin show -json planfile > tf-plan.json
          echo "JSON_PLAN_PATH=$(realpath tf-plan.json)"  >> $GITHUB_OUTPUT
      - name: Summarize plan
        id: plan-summary
        uses: vivantehealth/terraform-plan-summary-action@v0
        with:
          json-tf-plan: "${{ steps.json-plan.outputs.JSON_PLAN_PATH }}"
          environment: "dev"

About

GitHub Action to summarize a Terraform plan file and add it to the Job Summary

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •