Skip to content

[toy-store-app] syntax correction for granting Vertex AI User ROLE to the AlloyDB service account #1982

@gitsnead

Description

@gitsnead

After Data Ingest in the toy-store-app codelab, there are embedded quotes in the bit of code that derives the AlloyDB Service account id.
This line

gcloud projects add-iam-policy-binding $PROJECT_ID \
  --member="serviceAccount:service-$(gcloud projects describe $PROJECT_ID --format="value(projectNumber)")@gcp-sa-alloydb.iam.gserviceaccount.com" \
--role="roles/aiplatform.user"

should be changed to

gcloud projects add-iam-policy-binding $PROJECT_ID \
  --member="serviceAccount:service-$(gcloud projects describe $PROJECT_ID --format='value(projectNumber)')@gcp-sa-alloydb.iam.gserviceaccount.com" \
--role="roles/aiplatform.user"

Note the single quotes around 'value(projectNumber)'

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions