Skip to content

Commit 3051713

Browse files
authored
add kg config to discovery search engine (GoogleCloudPlatform#16262)
1 parent f6082e0 commit 3051713

3 files changed

Lines changed: 61 additions & 3 deletions

File tree

mmv1/products/discoveryengine/SearchEngine.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,47 @@ properties:
173173
174174
If this field is set and processed successfully, the Engine will be
175175
protected by the KMS key, as indicated in the cmek_config field.
176+
- name: 'knowledgeGraphConfig'
177+
type: NestedObject
178+
description: |
179+
Configurations for the Knowledge Graph.
180+
properties:
181+
- name: 'enableCloudKnowledgeGraph'
182+
type: Boolean
183+
default_from_api: true
184+
description: |
185+
Whether to enable the Cloud Knowledge Graph for the engine.
186+
- name: 'cloudKnowledgeGraphTypes'
187+
type: Array
188+
description: |
189+
Specify entity types to support.
190+
item_type:
191+
type: String
192+
description: |
193+
Specify entity types to support.
194+
- name: 'enablePrivateKnowledgeGraph'
195+
type: Boolean
196+
default_from_api: true
197+
description: |
198+
Whether to enable the Private Knowledge Graph for the engine.
199+
- name: 'featureConfig'
200+
type: NestedObject
201+
description: |
202+
Feature config for the Knowledge Graph.
203+
properties:
204+
- name: 'disablePrivateKgQueryUnderstanding'
205+
type: Boolean
206+
description: |
207+
Whether to disable the private KG query understanding for the engine.
208+
- name: 'disablePrivateKgEnrichment'
209+
type: Boolean
210+
description: |
211+
Whether to disable the private KG enrichment for the engine.
212+
- name: 'disablePrivateKgAutoComplete'
213+
type: Boolean
214+
description: |
215+
Whether to disable the private KG auto complete for the engine.
216+
- name: 'disablePrivateKgQueryUiChips'
217+
type: Boolean
218+
description: |
219+
Whether to disable the private KG for query UI chips.

mmv1/templates/terraform/examples/discoveryengine_searchengine_agentspace_basic.tf.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ resource "google_discovery_engine_search_engine" "agentspace_basic" {
1717
app_type = "APP_TYPE_INTRANET"
1818
search_engine_config {
1919
}
20+
knowledge_graph_config {
21+
}
2022
}

mmv1/third_party/terraform/services/discoveryengine/resource_discovery_engine_search_engine_test.go

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ func TestAccDiscoveryEngineSearchEngine_discoveryengineSearchengineBasicExample_
1212

1313
context := map[string]interface{}{
1414
"random_suffix": acctest.RandString(t, 10),
15-
"kms_key_name": acctest.BootstrapKMSKeyWithPurposeInLocationAndName(t, "ENCRYPT_DECRYPT", "us", "tftest-shared-key-6").CryptoKey.Name,
1615
}
1716

1817
acctest.VcrTest(t, resource.TestCase{
@@ -78,7 +77,10 @@ resource "google_discovery_engine_search_engine" "basic" {
7877
search_tier = "SEARCH_TIER_ENTERPRISE"
7978
search_add_ons = ["SEARCH_ADD_ON_LLM"]
8079
}
81-
kms_key_name = "%{kms_key_name}"
80+
knowledge_graph_config {
81+
enable_cloud_knowledge_graph = true
82+
enable_private_knowledge_graph = true
83+
}
8284
}
8385
`, context)
8486
}
@@ -120,7 +122,17 @@ resource "google_discovery_engine_search_engine" "basic" {
120122
features = {
121123
feedback = "FEATURE_STATE_OFF"
122124
}
123-
kms_key_name = "%{kms_key_name}"
125+
knowledge_graph_config {
126+
enable_cloud_knowledge_graph = false
127+
cloud_knowledge_graph_types = ["foobar"]
128+
enable_private_knowledge_graph = false
129+
feature_config {
130+
disable_private_kg_query_understanding = true
131+
disable_private_kg_enrichment = true
132+
disable_private_kg_auto_complete = true
133+
disable_private_kg_query_ui_chips = true
134+
}
135+
}
124136
}
125137
`, context)
126138
}

0 commit comments

Comments
 (0)