Skip to content

Commit 184ff95

Browse files
authored
Fix issue#20603 (#13295)
1 parent bfce3cf commit 184ff95

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

mmv1/products/discoveryengine/SearchEngine.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ properties:
100100
description: |
101101
The data stores associated with this engine. For SOLUTION_TYPE_SEARCH type of engines, they can only associate with at most one data store.
102102
required: true
103-
immutable: true
104103
item_type:
105104
type: String
106105
- name: 'createTime'

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

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package discoveryengine_test
22

33
import (
4+
"testing"
5+
46
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
57
"github.com/hashicorp/terraform-provider-google/google/acctest"
6-
"testing"
78
)
89

910
func TestAccDiscoveryEngineSearchEngine_discoveryengineSearchengineBasicExample_update(t *testing.T) {
@@ -53,12 +54,21 @@ resource "google_discovery_engine_data_store" "basic" {
5354
solution_types = ["SOLUTION_TYPE_SEARCH"]
5455
create_advanced_site_search = false
5556
}
57+
resource "google_discovery_engine_data_store" "second" {
58+
location = "global"
59+
data_store_id = "tf-test-example2-datastore%{random_suffix}"
60+
display_name = "tf-test-structured-datastore2"
61+
industry_vertical = "GENERIC"
62+
content_config = "NO_CONTENT"
63+
solution_types = ["SOLUTION_TYPE_SEARCH"]
64+
create_advanced_site_search = false
65+
}
5666
resource "google_discovery_engine_search_engine" "basic" {
5767
engine_id = "tf-test-example-engine-id%{random_suffix}"
5868
collection_id = "default_collection"
5969
location = google_discovery_engine_data_store.basic.location
6070
display_name = "Example Display Name"
61-
data_store_ids = [google_discovery_engine_data_store.basic.data_store_id]
71+
data_store_ids = [google_discovery_engine_data_store.basic.data_store_id, google_discovery_engine_data_store.second.data_store_id]
6272
industry_vertical = google_discovery_engine_data_store.basic.industry_vertical
6373
common_config {
6474
company_name = "Example Company Name"
@@ -82,6 +92,15 @@ resource "google_discovery_engine_data_store" "basic" {
8292
solution_types = ["SOLUTION_TYPE_SEARCH"]
8393
create_advanced_site_search = false
8494
}
95+
resource "google_discovery_engine_data_store" "second" {
96+
location = "global"
97+
data_store_id = "tf-test-example2-datastore%{random_suffix}"
98+
display_name = "tf-test-structured-datastore2"
99+
industry_vertical = "GENERIC"
100+
content_config = "NO_CONTENT"
101+
solution_types = ["SOLUTION_TYPE_SEARCH"]
102+
create_advanced_site_search = false
103+
}
85104
resource "google_discovery_engine_search_engine" "basic" {
86105
engine_id = "tf-test-example-engine-id%{random_suffix}"
87106
collection_id = "default_collection"

0 commit comments

Comments
 (0)