ci(destroy): add workflow_dispatch and terragrunt retry on all commands (#34)

This commit is contained in:
Zack Pollard
2026-04-22 17:33:15 +00:00
committed by GitHub
parent ebeb6d664c
commit f0d7bf403e
2 changed files with 15 additions and 1 deletions
+7 -1
View File
@@ -2,6 +2,12 @@ name: Destroy PR environment
on:
pull_request_target:
types: [closed]
workflow_dispatch:
inputs:
pr_number:
description: 'PR number whose pr-<N> stage to destroy in dev + prod'
required: true
type: string
env:
TG_NON_INTERACTIVE: 'true'
@@ -15,7 +21,7 @@ jobs:
environment: ['dev', 'prod']
env:
ENVIRONMENT: ${{ matrix.environment }}
TF_VAR_stage: pr-${{ github.event.number }}
TF_VAR_stage: pr-${{ github.event.inputs.pr_number || github.event.number }}
TF_VAR_dist_dir: ${{ github.workspace }}/dist
TF_VAR_migrations_dir: ${{ github.workspace }}/apps/version/migrations
OP_SERVICE_ACCOUNT_TOKEN: ${{ matrix.environment == 'prod' && secrets.OP_TF_PROD_ENV || secrets.OP_TF_DEV_ENV }}
+8
View File
@@ -10,6 +10,14 @@ remote_state {
}
}
errors {
retry "transient" {
retryable_errors = [".*"]
max_attempts = 3
sleep_interval_sec = 30
}
}
inputs = {
tf_state_postgres_conn_str = local.tf_state_postgres_conn_str
}