Skip to content

Commit

Permalink
add "Create destroy plan"
Browse files Browse the repository at this point in the history
  • Loading branch information
italopessoa committed Sep 22, 2024
1 parent 5b9933a commit 7ee9e52
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ jobs:
environment: dev
permissions:
contents: read
outputs:
CONFIG_VERSION: ${{ steps.plan-upload.outputs.configuration_version_id }}

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -239,4 +242,18 @@ jobs:
id: apply
with:
run: ${{ steps.apply-run.outputs.run_id }}
comment: "Confirmed from GitHub Actions CI ${{ github.sha }}"
comment: "Confirmed from GitHub Actions CI ${{ github.sha }}"

destroy-plan:
name: "Create terraform destroy plan"
needs: [create-app]
runs-on: ubuntu-latest

steps:
- name: Create plan
uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: destroy-plan
with:
workspace: ${{ env.TF_WORKSPACE }}
configuration_version: ${{ NEEDS.create-app.outputs.CONFIG_VERSION }}
is_destroy: true

0 comments on commit 7ee9e52

Please sign in to comment.