diff --git a/mmv1/templates/terraform/examples/firestore_field_basic.tf.erb b/mmv1/templates/terraform/examples/firestore_field_basic.tf.erb index 5ff7c9a7a228..71b23926b04f 100644 --- a/mmv1/templates/terraform/examples/firestore_field_basic.tf.erb +++ b/mmv1/templates/terraform/examples/firestore_field_basic.tf.erb @@ -1,5 +1,6 @@ resource "google_firestore_field" "<%= ctx[:primary_resource_id] %>" { project = "<%= ctx[:test_env_vars]['project_id'] %>" + database = "(default)" collection = "chatrooms_%{random_suffix}" field = "basic" diff --git a/mmv1/third_party/terraform/tests/resource_firestore_field_test.go b/mmv1/third_party/terraform/tests/resource_firestore_field_test.go index 86b386efd40e..1a6fd0108eaa 100644 --- a/mmv1/third_party/terraform/tests/resource_firestore_field_test.go +++ b/mmv1/third_party/terraform/tests/resource_firestore_field_test.go @@ -71,19 +71,19 @@ func testAccFirestoreField_runUpdateTest(updateConfig string, t *testing.T, cont func testAccFirestoreField_firestoreFieldUpdateInitialExample(context map[string]interface{}) string { return Nprintf(` resource "google_firestore_field" "%{resource_name}" { - project = "%{project_id}" - collection = "chatrooms_%{random_suffix}" - field = "%{resource_name}" + project = "%{project_id}" + collection = "chatrooms_%{random_suffix}" + field = "%{resource_name}" - index_config { - indexes { - order = "ASCENDING" - query_scope = "COLLECTION_GROUP" - } - indexes { - array_config = "CONTAINS" - } - } + index_config { + indexes { + order = "ASCENDING" + query_scope = "COLLECTION_GROUP" + } + indexes { + array_config = "CONTAINS" + } + } } `, context) } @@ -91,21 +91,21 @@ resource "google_firestore_field" "%{resource_name}" { func testAccFirestoreField_firestoreFieldUpdateAddTTLExample(context map[string]interface{}) string { return Nprintf(` resource "google_firestore_field" "%{resource_name}" { - project = "%{project_id}" - collection = "chatrooms_%{random_suffix}" - field = "%{resource_name}" + project = "%{project_id}" + collection = "chatrooms_%{random_suffix}" + field = "%{resource_name}" - index_config { - indexes { - order = "ASCENDING" - query_scope = "COLLECTION_GROUP" - } - indexes { - array_config = "CONTAINS" - } - } + index_config { + indexes { + order = "ASCENDING" + query_scope = "COLLECTION_GROUP" + } + indexes { + array_config = "CONTAINS" + } + } - ttl_config {} + ttl_config {} } `, context) } @@ -113,23 +113,23 @@ resource "google_firestore_field" "%{resource_name}" { func testAccFirestoreField_firestoreFieldUpdateAddIndexExample(context map[string]interface{}) string { return Nprintf(` resource "google_firestore_field" "%{resource_name}" { - project = "%{project_id}" - collection = "chatrooms_%{random_suffix}" - field = "%{resource_name}" + project = "%{project_id}" + collection = "chatrooms_%{random_suffix}" + field = "%{resource_name}" - index_config { - indexes { - order = "ASCENDING" - query_scope = "COLLECTION_GROUP" - } - indexes { - array_config = "CONTAINS" - } - indexes { - order = "DESCENDING" - query_scope = "COLLECTION_GROUP" + index_config { + indexes { + order = "ASCENDING" + query_scope = "COLLECTION_GROUP" + } + indexes { + array_config = "CONTAINS" + } + indexes { + order = "DESCENDING" + query_scope = "COLLECTION_GROUP" + } } - } } `, context) }