-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
destroy after seed to prevent locking the workspacec
- Loading branch information
1 parent
d4e0f20
commit 199545d
Showing
1 changed file
with
14 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -213,21 +213,6 @@ jobs: | |
echo "cluster=$(echo ${{ toJson(steps.workspace-output.outputs.outputs) }} | jq -r '.[] | select(.name == "cluster") | .value')" >> $GITHUB_OUTPUT | ||
echo "host=$(echo ${{ toJson(steps.workspace-output.outputs.outputs) }} | jq -r '.[] | select(.name == "host") | .value')" >> $GITHUB_OUTPUT | ||
destroy-plan: | ||
if: false | ||
name: "Create terraform destroy plan" | ||
needs: [deploy] | ||
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.deploy.outputs.config_version }} | ||
is_destroy: true | ||
|
||
seed-database: | ||
needs: [deploy] | ||
name: "Seed database" | ||
|
@@ -301,3 +286,17 @@ jobs: | |
id: destroy | ||
run: | | ||
terraform destroy -auto-approve | ||
destroy-plan: | ||
name: "Create terraform destroy plan" | ||
needs: [deploy, seed-database] | ||
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.deploy.outputs.config_version }} | ||
is_destroy: true |