From 9a9850356978508f83ea5a60c898e1fd4c0d6d0f Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 23 Aug 2023 08:23:13 +0100 Subject: [PATCH] remove hardcoded stage in database credentials fetch --- .github/workflows/deploy_fastapi_backend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_fastapi_backend.yml b/.github/workflows/deploy_fastapi_backend.yml index 3875a5f2..8028d428 100644 --- a/.github/workflows/deploy_fastapi_backend.yml +++ b/.github/workflows/deploy_fastapi_backend.yml @@ -94,7 +94,7 @@ jobs: ECR_URI: ${{ steps.set_ecr_credentials.outputs.ecr_uri }} run: | # Fetch database credentials from AWS Secrets Manager - SECRET_VALUE=$(aws secretsmanager get-secret-value --secret-id dev/assessment_model/db_credentials --query SecretString) + SECRET_VALUE=$(aws secretsmanager get-secret-value --secret-id ${{ github.ref_name }}/assessment_model/db_credentials --query SecretString) DB_USERNAME=$(echo "$SECRET_VALUE" | jq -r '. | fromjson | .db_assessment_model_username') DB_PASSWORD=$(echo "$SECRET_VALUE" | jq -r '. | fromjson | .db_assessment_model_password')