Skip to content

fix(discovery-engine): grant Discovery Engine service agent objectViewer on corpus bucket - #219

Open
AloysJehwin wants to merge 1 commit into
google:mainfrom
AloysJehwin:fix/discovery-engine-gcs-iam-grant
Open

fix(discovery-engine): grant Discovery Engine service agent objectViewer on corpus bucket#219
AloysJehwin wants to merge 1 commit into
google:mainfrom
AloysJehwin:fix/discovery-engine-gcs-iam-grant

Conversation

@AloysJehwin

Copy link
Copy Markdown
Contributor

Summary

Fixes #145

The discovery-engine.tf creates GCS corpus buckets for Discovery Engine data stores but never grants the Discovery Engine service agent (service-<project_number>@gcp-sa-discoveryengine.iam.gserviceaccount.com) roles/storage.objectViewer on them. This causes every gem4gov datastore import to silently fail with PERMISSION_DENIED, resulting in zero documents indexed.

This PR adds a google_storage_bucket_iam_member resource (corpus_bucket_discovery_engine) mirroring the existing KMS grant pattern in cmek.tf, iterating over the same for_each map used by the bucket resource.

…wer on corpus bucket

Without roles/storage.objectViewer on the GCS corpus buckets, the
Discovery Engine service agent cannot read documents during import,
causing every `gem4gov datastore import` to fail with PERMISSION_DENIED
and zero documents indexed.

Fixes google#145

Signed-off-by: Aloys Jehwin <aloysjehwin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant