Skip to content

Commit

Permalink
fix: Correct SA custom name flag check in setup, fixes #416 (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
morgante authored May 8, 2020
1 parent b7246ee commit 9da8158
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helpers/setup-sa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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}"
Expand Down

0 comments on commit 9da8158

Please sign in to comment.