diff --git a/bootstrap/ecr.sh b/bootstrap/ecr.sh index 45ed0f1..0e113cd 100755 --- a/bootstrap/ecr.sh +++ b/bootstrap/ecr.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash REPO_NAME="defenseunicorns/pepr/controller" ECR_CMD="ecr" @@ -26,11 +26,12 @@ if ! aws "$ECR_CMD" describe-repositories \ --repository-names "$REPO_NAME" \ --region "$AWS_REGION" >/dev/null 2>&1 then - ARGS="--repository-name $REPO_NAME --region $AWS_REGION" + ARGS=("--repository-name" "$REPO_NAME" "--region" "$AWS_REGION") if [ "$REGISTRY_TYPE" = "private" ]; then - ARGS="$ARGS --image-scanning-configuration scanOnPush=true --image-tag-mutability IMMUTABLE" + ARGS+=("--image-scanning-configuration" "scanOnPush=true" "--image-tag-mutability" "IMMUTABLE") fi - aws "$ECR_CMD" create-repository "$ARGS" + aws "$ECR_CMD" create-repository "${ARGS[@]}" fi +