Repository navigation
[Feature Request] Gemini Enterprise CMEK index pre-warming, companion seed data store, declarative CmekConfig, and readiness probe #390
Copy link
Copy link
Open
Labels
EnhancementNew feature or requestNew feature or requestGemini - EnterpriseGemini Enterprise (GE) relatedGemini Enterprise (GE) relatedGemini - GovernmentGemini for Government (G4G) relatedGemini for Government (G4G) relatedLevel of Effort - MediumModerate task requiring thought and testing; typically takes a couple of days to a weekModerate task requiring thought and testing; typically takes a couple of days to a weekPriority - HighCritical issues blocking development or users; urgent bugs or core features for releaseCritical issues blocking development or users; urgent bugs or core features for releaseScope - BlueprintRelated to solution blueprints in the blueprints directoryRelated to solution blueprints in the blueprints directoryScope - FastRelated to Fabric FAST deployment stages in the fast directoryRelated to Fabric FAST deployment stages in the fast directory
Description
Feature Description
Improve the Gemini Enterprise (Gemini for Government) CMEK deployment lifecycle across FAST Stage 1 (fast/stages-aw/1-resman) and the Gemini Enterprise blueprint (blueprints/gemini-enterprise) in four areas:
- Optional Stage 1 (
1-resman) tenant CMEK index pre-warming (enable_gemini_enterprise) so the 24 to 48 hour Discovery Engine single-tenant CMEK search index allocation starts during tenant creation rather than blocking Stage 0 application deployment. - Default companion
NO_CONTENTseed data store (enable_cmek_seed_data_store = true) inblueprints/gemini-enterprise/gemini-stage-0/discovery-engine.tfso everygoogle_discovery_engine_search_engineinstance links at least two data stores (BLENDED_SEARCH), preventing Discovery Engine single-store linkage lock-in (Engines linked to a single data store cannot change their linked data store). - Declarative
google_discovery_engine_cmek_configresource management inblueprints/gemini-enterprise/gemini-stage-0/cmek.tfwith explicitdepends_onordering fromgoogle_discovery_engine_data_storeresources. - A
gem4gov datastore check-readinessCLI subcommand anddeploy.shhelper option that probesservingConfigs/default_search:search(pageSize=1) to distinguishINDEXING(HTTP 400 FAILED_PRECONDITIONwhile the initial CMEK index is building) fromREADY(HTTP 200).
Use Case
- Registering a new regional or multi-regional
CmekConfigin Discovery Engine provisions a dedicated single-tenant search index in the background that takes 24 to 48 hours to finish building (FAILED_PRECONDITION: The initial index is being built). Starting this provisioning step only when deploying the Stage 0 workload blueprint delays end-to-end validation by up to two days. - When
google_discovery_engine_search_engineis created with only a single linkeddata_store_idsentry (data_store_ids.size() == 1), the Discovery Engine API permanently blocks subsequentPatchEngineupdates from adding, swapping, or removingdata_store_idson that engine. Adding a second data store later forces Terraform to destroy and recreate the search engine, invalidating the Stage 1 load balancer backend service and URL map references. - Operators running standalone
terraform applyinsidegemini-stage-0withoutdeploy.shneed Terraform to registergoogle_discovery_engine_cmek_configbefore creating anygoogle_discovery_engine_data_storeresources. - Operators currently have no visibility in
gem4gov-cliordeploy.shinto whether the background CMEK search index allocation is stillINDEXINGorREADY.
Proposed Solution
- In
fast/stages-aw/1-resman/variables.tf,fast/stages-aw/1-resman/branch-tenants.tf,fast/stages-aw/1-resman/kms.tf, andfast/stages-aw/1-resman/outputs-tenants.tf, add an opt-inenable_gemini_enterprise = optional(bool, false)tenant attribute that enablesdiscoveryengine.googleapis.com, creates the<env>-usKMS keyring andgemini-enterprisekey inus, grantsroles/cloudkms.cryptoKeyEncrypterDecryptertoservice-<project_number>@gcp-sa-discoveryengine.iam.gserviceaccount.com, registersgoogle_discovery_engine_cmek_config, and provisions an emptyNO_CONTENTseed data store (${tenant}-ge-cmek-seed-ds). - In
blueprints/gemini-enterprise/gemini-stage-0/discovery-engine.tfandblueprints/gemini-enterprise/gemini-stage-0/variables.tf, provisiongoogle_discovery_engine_data_store.cmek_seed(enable_cmek_seed_data_store = trueby default) alongsidedefault_connector_datastoreand wire both intogoogle_discovery_engine_search_engine.gemini_enterprise_search_engine.data_store_idssodata_store_idsalways contains at least two stores. - In
blueprints/gemini-enterprise/gemini-stage-0/cmek.tf, managegoogle_discovery_engine_cmek_config.default(set_default = true,deletion_policy = "ABANDON") and adddepends_on = [google_discovery_engine_cmek_config.default]to allgoogle_discovery_engine_data_storeresources indiscovery-engine.tf. - In
blueprints/gemini-enterprise/gem4gov-cli/data_stores.py,blueprints/gemini-enterprise/gem4gov-cli/gem4gov.py, andblueprints/gemini-enterprise/deploy.sh, addgem4gov datastore check-readinessto queryservingConfigs/default_search:search(pageSize=1) and reportINDEXINGversusREADY.
Compliance & Deployment Context
- Target Deployment Type(s):
- US Region Restricted (e.g., Access Policy constraint)
- FedRAMP Medium
- FedRAMP High
- DoD IL4
- DoD IL5
- All / General
- Relevant NIST 800-53r5 Controls: SC-12 (Cryptographic Key Establishment and Management), SC-28 (Protection of Information at Rest), CM-2 (Baseline Configuration).
Reusability Check
Stellar Engine prioritizes reusability.
- I have checked if this can be implemented using or extending an existing module in Cloud Foundation Fabric (which Stellar Engine is forked from).
- I have checked if this functionality already exists in another part of Stellar Engine and can be refactored for reuse.
Alternatives Considered
- Waiting until Stage 0 application rollout to register
CmekConfigleaves operators blocked for 24 to 48 hours while the single-tenant CMEK search index initializes. - Creating the search engine with a single data store forces destructive replacement of
google_discovery_engine_search_enginewhenever additional GCS or BigQuery data stores are linked later.
Additional Context
- Affects
fast/stages-aw/1-resmanandblueprints/gemini-enterprise(gemini-stage-0,gem4gov-cli, anddeploy.sh).
Metadata
Metadata
Assignees
Labels
EnhancementNew feature or requestNew feature or requestGemini - EnterpriseGemini Enterprise (GE) relatedGemini Enterprise (GE) relatedGemini - GovernmentGemini for Government (G4G) relatedGemini for Government (G4G) relatedLevel of Effort - MediumModerate task requiring thought and testing; typically takes a couple of days to a weekModerate task requiring thought and testing; typically takes a couple of days to a weekPriority - HighCritical issues blocking development or users; urgent bugs or core features for releaseCritical issues blocking development or users; urgent bugs or core features for releaseScope - BlueprintRelated to solution blueprints in the blueprints directoryRelated to solution blueprints in the blueprints directoryScope - FastRelated to Fabric FAST deployment stages in the fast directoryRelated to Fabric FAST deployment stages in the fast directory
Activity