Skip to content

Commit

Permalink
🔧 (ephemeral-cloud-infra.yml): add enable and disable commands to man…
Browse files Browse the repository at this point in the history
…age stack state before and after destroy operations
  • Loading branch information
jandroav committed May 28, 2024
1 parent 256d6e1 commit be192c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ephemeral-cloud-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jobs:
spacectl stack environment setvar --id $EPHEMERAL_STACK_ID TF_VAR_create_dynamodb ${{ inputs.dynamodb }}
spacectl stack environment setvar --id $EPHEMERAL_STACK_ID TF_VAR_create_documentdb ${{ inputs.documentdb }}
spacectl stack deploy --id $EPHEMERAL_STACK_ID --auto-confirm
spacectl stack disable --id $EPHEMERAL_STACK_ID
- name: Destroy ephemeral infra
continue-on-error: true
Expand All @@ -107,7 +108,9 @@ jobs:
if: ${{ inputs.destroy }}
working-directory: test-automation-ephemeral/infra
run: |
spacectl stack enable --id $EPHEMERAL_STACK_ID
spacectl stack task --id ${{ inputs.stack_id }} --tail "terraform destroy -refresh=false -parallelism=10 -auto-approve"
spacectl stack disable --id $EPHEMERAL_STACK_ID
- name: Download Terraform state
if: ${{ inputs.destroy }}
Expand All @@ -120,4 +123,5 @@ jobs:
if: ${{ inputs.destroy }}
working-directory: test-automation-ephemeral/stack
run: |
spacectl stack enable --id $EPHEMERAL_STACK_ID
terraform destroy -auto-approve

0 comments on commit be192c2

Please sign in to comment.