Skip to content

Commit

Permalink
preproduction database restore
Browse files Browse the repository at this point in the history
  • Loading branch information
Neill Turner committed Nov 4, 2024
1 parent a62d224 commit b4f94e0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/database-ptr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
type: choice
options:
- test
- preproduction
- preprod
- production
confirm-production:
description: Must be set to true if restoring production
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Set environment variables
run: |
source global_config/${{ inputs.environment }}.sh
tf_vars_file=${{ env.TF_VARS_PATH }}/${{ inputs.environment }}/variables.tfvars.json
tf_vars_file=${{ env.TF_VARS_PATH }}/${{ env.ENVIRONMENT }}/variables.tfvars.json
echo "CLUSTER=$(jq -r '.cluster' ${tf_vars_file})" >> $GITHUB_ENV
echo "RESOURCE_GROUP_NAME=${AZURE_RESOURCE_PREFIX}-${SERVICE_SHORT}-${CONFIG_SHORT}-rg" >> $GITHUB_ENV
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/database-restore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
options:
- development
- test
- preproduction
- preprod
- production
confirm-production:
description: Must be set to true if restoring production
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Set environment variables
run: |
source global_config/${{ inputs.environment }}.sh
tf_vars_file=${{ env.TF_VARS_PATH }}/${{ inputs.environment }}/variables.tfvars.json
tf_vars_file=${{ env.TF_VARS_PATH }}/${{ env.ENVIRONMENT }}/variables.tfvars.json
echo "CLUSTER=$(jq -r '.cluster' ${tf_vars_file})" >> $GITHUB_ENV
echo "RESOURCE_GROUP_NAME=${AZURE_RESOURCE_PREFIX}-${SERVICE_SHORT}-${CONFIG_SHORT}-rg" >> $GITHUB_ENV
echo "STORAGE_ACCOUNT_NAME=${AZURE_RESOURCE_PREFIX}${SERVICE_SHORT}dbbkp${CONFIG_SHORT}sa" >> $GITHUB_ENV
Expand All @@ -65,7 +65,7 @@ jobs:
with:
storage-account: ${{ env.STORAGE_ACCOUNT_NAME }}
resource-group: ${{ env.RESOURCE_GROUP_NAME }}
app-name: ${{ env.SERVICE_NAME }}-${{ inputs.environment }}-web
app-name: ${{ env.SERVICE_NAME }}-${{ env.ENVIRONMENT }}-web
cluster: ${{ env.CLUSTER }}
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}
backup-file: ${{ env.BACKUP_FILE }}
6 changes: 0 additions & 6 deletions global_config/preproduction.sh

This file was deleted.

0 comments on commit b4f94e0

Please sign in to comment.