diff --git a/.github/workflows/database-ptr.yml b/.github/workflows/database-ptr.yml index 8f7d68871..e45a15f17 100644 --- a/.github/workflows/database-ptr.yml +++ b/.github/workflows/database-ptr.yml @@ -10,6 +10,7 @@ on: type: choice options: - test + - preprod - production confirm-production: description: Must be set to true if restoring production @@ -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 }}/${CONFIG}/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 diff --git a/.github/workflows/database-restore.yml b/.github/workflows/database-restore.yml index d6ab5352a..f1fb83a00 100644 --- a/.github/workflows/database-restore.yml +++ b/.github/workflows/database-restore.yml @@ -11,6 +11,7 @@ on: options: - development - test + - preprod - production confirm-production: description: Must be set to true if restoring production @@ -45,7 +46,8 @@ 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 }}/${CONFIG}/variables.tfvars.json + echo "CONFIG=${CONFIG}" >> $GITHUB_ENV 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 @@ -64,7 +66,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 }}-${CONFIG}-web cluster: ${{ env.CLUSTER }} azure-credentials: ${{ secrets.AZURE_CREDENTIALS }} backup-file: ${{ env.BACKUP_FILE }}