Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions scripts/setup_workload_identity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,13 @@ gcloud projects add-iam-policy-binding "${GOOGLE_CLOUD_PROJECT}" \
--member="serviceAccount:${SERVICE_ACCOUNT_EMAIL}" \
--condition=None

# Allow the service account to generate an access tokens
print_info "Granting 'Service Account Token Creator' role to Service Account..."
# Allow the service account to generate an access tokens (self-impersonation only)
print_info "Granting 'Service Account Token Creator' role to Service Account (self-impersonation)..."

gcloud projects add-iam-policy-binding "${GOOGLE_CLOUD_PROJECT}" \
gcloud iam service-accounts add-iam-policy-binding "${SERVICE_ACCOUNT_EMAIL}" \
--project="${GOOGLE_CLOUD_PROJECT}" \
--role="roles/iam.serviceAccountTokenCreator" \
--member="serviceAccount:${SERVICE_ACCOUNT_EMAIL}" \
--condition=None
--member="serviceAccount:${SERVICE_ACCOUNT_EMAIL}"

# Grant logging permissions to the service account
print_info "Granting 'Logging Writer' role to Service Account..."
Expand Down
Loading