-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preproduction database restore #2482
Conversation
@@ -45,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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${{ env.ENVIRONMENT }} is not set at this point
But $ENVIRONMENT should work
@@ -64,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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ENVIRONMENT is not set in GITHUB_ENV
.github/workflows/database-ptr.yml
Outdated
@@ -45,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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${{ env.ENVIRONMENT }} is not set at this point
But $ENVIRONMENT should work
Context
support restore and restore to point in time in preproduction for DR testing
Changes proposed in this pull request
add preprod to database_restore and database_ptr workflow
Guidance to review
Restore Point in Time
gh workflow run "Restore database from point in time to new database server" -r database-restore -f environment=preproduction -f restore-time=2024-10-29T06:00:00
see https://github.com/DFE-Digital/apply-for-qualified-teacher-status/actions/runs/11666600131
Restore from backup
gh workflow run "Restore database from Azure storage" -r database-restore -f environment=preproduction -f backup-file=afqts_pp_adhoc_2024-11-01.sql.gz
see https://github.com/DFE-Digital/apply-for-qualified-teacher-status/actions/runs/11666736478
Link to Trello card
AFQTS: database restore and ptr to preprod
Checklist