mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 07:15:49 +00:00
Fixup: ECR does not have the --tag-specifications. Used ecr tag-resource instead
This commit is contained in:
parent
e4a122831c
commit
b242de2d39
1 changed files with 5 additions and 1 deletions
|
@ -69,7 +69,6 @@ echo "Creating Elastic Container Registry (ECR)..."
|
||||||
ECR_REPO_JSON=$(aws ecr create-repository \
|
ECR_REPO_JSON=$(aws ecr create-repository \
|
||||||
--repository-name "$ECR_NAME" \
|
--repository-name "$ECR_NAME" \
|
||||||
--region "$REGION" \
|
--region "$REGION" \
|
||||||
--tag-specifications 'ResourceType=repository,Tags=[{Key=Name,Value='"$VPC_NAME"'},{Key=Owner,Value='"$OWNER"'},{Key=Project,Value='"$PROJECT"'}]' \
|
|
||||||
--query 'repository' \
|
--query 'repository' \
|
||||||
--output json)
|
--output json)
|
||||||
ECR_REPO_URI=$(echo "$ECR_REPO_JSON" | jq -r '.repositoryUri')
|
ECR_REPO_URI=$(echo "$ECR_REPO_JSON" | jq -r '.repositoryUri')
|
||||||
|
@ -81,6 +80,11 @@ if [ -z "$ECR_REPO_URI" ] || [ -z "$ECR_REPO_ARN" ]; then
|
||||||
fi
|
fi
|
||||||
echo "ECR repository created: $ECR_REPO_URI"
|
echo "ECR repository created: $ECR_REPO_URI"
|
||||||
|
|
||||||
|
# Adding tags to the ECR repository
|
||||||
|
aws ecr tag-resource \
|
||||||
|
--resource-arn "$ECR_REPO_ARN" \
|
||||||
|
--tags Key=Name,Value="$ECR_NAME" Key=Owner,Value="$OWNER" Key=Project,Value="$PROJECT"
|
||||||
|
|
||||||
echo "Tags added to ECR repository."
|
echo "Tags added to ECR repository."
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue