From 9da81586f218c13c69f13a4034f606203ac8187c Mon Sep 17 00:00:00 2001 From: Morgante Pell Date: Fri, 8 May 2020 15:14:46 -0400 Subject: [PATCH] fix: Correct SA custom name flag check in setup, fixes #416 (#418) --- helpers/setup-sa.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/setup-sa.sh b/helpers/setup-sa.sh index 34debe86..c1fa985c 100755 --- a/helpers/setup-sa.sh +++ b/helpers/setup-sa.sh @@ -125,7 +125,7 @@ else fi # Seed Service Account creation -if [ -n "${n}" ]; then +if [ -z "${n}" ]; then SA_NAME="project-factory-${RANDOM}" else SA_NAME="$n" @@ -134,7 +134,7 @@ SA_ID="${SA_NAME}@${SEED_PROJECT}.iam.gserviceaccount.com" STAGING_DIR="${PWD}" KEY_FILE="${STAGING_DIR}/credentials.json" -echo "Creating Seed Service Account..." +echo "Creating Seed Service Account named $SA_ID..." gcloud iam service-accounts \ --project "${SEED_PROJECT}" create "${SA_NAME}" \ --display-name "${SA_NAME}"