Skip to content

Commit

Permalink
read ECR accout Id from AWS secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
pskushwaha1 committed May 20, 2024
1 parent 196d5ca commit 4ec68f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ci/terraform/get_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ echo "Setting the ECR repo registry ID"
# Else pull image from tools-prod to deploy ( Build , integration , Staging & prod ) frontend

if [ "$ENVIRONMENT" = "dev" ]; then
REGISTRY_ID=$(aws ssm get-parameter --name "AUTH_DEV_TOOLS_ACT_ID" --with-decryption --query 'Parameter.Value' --output text)
REGISTRY_ID=$TF_VAR_auth_dev_tooling_act_id
else
REGISTRY_ID=$(aws ssm get-parameter --name "AUTH_PROD_TOOLS_ACT_ID" --with-decryption --query 'Parameter.Value' --output text)
REGISTRY_ID=$TF_VAR_auth_prod_tooling_act_id
fi

echo "Loading frontend image..."
Expand All @@ -39,6 +39,8 @@ sidecar_image=$(aws ecr batch-get-image \

echo "Exporting env variables..."



export TF_VAR_image_uri="$REGISTRY_ID.dkr.ecr.eu-west-2.amazonaws.com/$FRONTEND_REPO_NAME"
export TF_VAR_image_digest=$frontend_image
export TF_VAR_image_tag=$GITHUB_SHA
Expand Down

0 comments on commit 4ec68f0

Please sign in to comment.