From 01c6ed6eed990aaaaf411652a7d1a4c05181ea93 Mon Sep 17 00:00:00 2001 From: Okesanya Odunayo <94924061+DrInTech22@users.noreply.github.com> Date: Tue, 10 Dec 2024 22:17:50 +0100 Subject: [PATCH] modify workflow --- .github/workflows/terraform-plan.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/terraform-plan.yml b/.github/workflows/terraform-plan.yml index 31eeb31..015623c 100644 --- a/.github/workflows/terraform-plan.yml +++ b/.github/workflows/terraform-plan.yml @@ -57,7 +57,7 @@ jobs: - name: Save Plan JSON id: save-plan - run: terraform show -json tfplan.out > tfplan.json + run: terraform show -json tfplan.out > ../tfplan.json working-directory: ./terraform # Checkout the branch you want Infracost to compare costs against, most commonly the target branch. @@ -71,14 +71,14 @@ jobs: api-key: ${{ secrets.INFRACOST_API_KEY }} - name: Run Infracost run: | - infracost breakdown --path=./terraform/tfplan.json --format=json --out-file=/tmp/infracost-base.json + infracost breakdown --path=./tfplan.json --format=json --out-file=/tmp/infracost-base.json # Checkout the PR branch with your infrastructure changes. - uses: actions/checkout@v4 - name: Run Infracost shell: bash run: | - infracost diff --path=./terraform/tfplan.json \ + infracost diff --path=./tfplan.json \ --format=json \ --compare-to=/tmp/infracost-base.json \ --out-file=/tmp/infracost.json