File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,13 @@ function variables_from_context() {
13
13
14
14
ACCOUNT_ID=$( ${AWS_CMD} sts get-caller-identity | jq -r .Account)
15
15
16
+ # use the default bucket?
17
+ if [ -z " ${CONTAINER_REGISTRY_BUCKET} " ]; then
18
+ CONTAINER_REGISTRY_BUCKET=" container-registry-${CLUSTER_NAME} -${ACCOUNT_ID} "
19
+ fi
20
+
16
21
CREATE_S3_BUCKET=" false"
17
- if " ${AWS_CMD} " s3api head-bucket --bucket " ${CONTAINER_REGISTRY_BUCKET} " 2 > /dev/null; then
22
+ if ! " ${AWS_CMD} " s3api head-bucket --bucket " ${CONTAINER_REGISTRY_BUCKET} " > /dev/null 2>&1 ; then
18
23
CREATE_S3_BUCKET=" true"
19
24
fi
20
25
@@ -23,6 +28,7 @@ function variables_from_context() {
23
28
export AWS_REGION
24
29
export ACCOUNT_ID
25
30
export CREATE_S3_BUCKET
31
+ export CONTAINER_REGISTRY_BUCKET
26
32
}
27
33
28
34
function check_prerequisites() {
@@ -61,10 +67,6 @@ function check_prerequisites() {
61
67
else
62
68
echo " Using external-dns. No manual intervention required."
63
69
fi
64
-
65
- if [ -z " ${CONTAINER_REGISTRY_BUCKET} " ]; then
66
- CONTAINER_REGISTRY_BUCKET=" container-registry-${CLUSTER_NAME} -${ACCOUNT_ID} "
67
- fi
68
70
}
69
71
70
72
# Bootstrap AWS CDK - https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html
You can’t perform that action at this time.
0 commit comments