🟢 For better readability and maintainability, you could group these roles into an array and loop through them.
# Grant additional roles to the service account
print_info "Granting additional roles to Service Account..."
for role in \
"roles/logging.logWriter" \
"roles/monitoring.editor" \
"roles/cloudtrace.agent" \
"roles/aiplatform.user"
do
gcloud projects add-iam-policy-binding "${GOOGLE_CLOUD_PROJECT}" \
--role="$role" \
--member="serviceAccount:${SERVICE_ACCOUNT_EMAIL}" \
--condition=None
done
Originally posted by @gemini-cli[bot] in #82 (comment)
🟢 For better readability and maintainability, you could group these roles into an array and loop through them.
Originally posted by @gemini-cli[bot] in #82 (comment)