File tree 6 files changed +129
-2
lines changed
templates/terraform/examples
6 files changed +129
-2
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,17 @@ examples:
124
124
- ' project'
125
125
- ' etag'
126
126
- ' deletion_policy'
127
+ - name : ' firestore_database_enterprise'
128
+ primary_resource_id : ' enterprise-db'
129
+ vars :
130
+ database_id : ' database-id'
131
+ delete_protection_state : ' DELETE_PROTECTION_ENABLED'
132
+ test_env_vars :
133
+ project_id : ' PROJECT_NAME'
134
+ ignore_read_extra :
135
+ - ' project'
136
+ - ' etag'
137
+ - ' deletion_policy'
127
138
virtual_fields :
128
139
- name : ' deletion_policy'
129
140
description : |
@@ -166,6 +177,17 @@ properties:
166
177
enum_values :
167
178
- ' FIRESTORE_NATIVE'
168
179
- ' DATASTORE_MODE'
180
+ - name : ' databaseEdition'
181
+ type : Enum
182
+ description : |
183
+ The database edition.
184
+ required : false
185
+ default_from_api : true
186
+ # Picking a database edition is an irreversible decision
187
+ immutable : true
188
+ enum_values :
189
+ - ' STANDARD'
190
+ - ' ENTERPRISE'
169
191
- name : ' concurrencyMode'
170
192
type : Enum
171
193
description : |
Original file line number Diff line number Diff line change @@ -81,6 +81,18 @@ examples:
81
81
database_id : ' database-id'
82
82
test_env_vars :
83
83
project_id : ' PROJECT_NAME'
84
+ - name : ' firestore_index_mongodb_compatible_scope'
85
+ primary_resource_id : ' my-index'
86
+ vars :
87
+ database_id : ' database-id-mongodb-compatible'
88
+ test_env_vars :
89
+ project_id : ' PROJECT_NAME'
90
+ - name : ' firestore_index_sparse_any'
91
+ primary_resource_id : ' my-index'
92
+ vars :
93
+ database_id : ' database-id-sparse-any'
94
+ test_env_vars :
95
+ project_id : ' PROJECT_NAME'
84
96
parameters :
85
97
properties :
86
98
- name : ' name'
@@ -119,6 +131,28 @@ properties:
119
131
enum_values :
120
132
- ' ANY_API'
121
133
- ' DATASTORE_MODE_API'
134
+ - ' MONGODB_COMPATIBLE_API'
135
+ - name : ' density'
136
+ type : Enum
137
+ description : |
138
+ The density configuration for this index.
139
+ immutable : true
140
+ default_from_api : true
141
+ enum_values :
142
+ - SPARSE_ALL
143
+ - SPARSE_ANY
144
+ - DENSE
145
+ - name : ' multikey'
146
+ type : Boolean
147
+ default_value : false
148
+ description :
149
+ Optional. Whether the index is multikey. By default, the index
150
+ is not multikey. For non-multikey indexes, none of the paths in the
151
+ index definition reach or traverse an array, except via an explicit
152
+ array index. For multikey indexes, at most one of the paths in the index
153
+ definition reach or traverse an array, except via an explicit array
154
+ index. Violations will result in errors. Note this field only applies to
155
+ indexes with MONGODB_COMPATIBLE_API ApiScope.
122
156
- name : ' fields'
123
157
type : Array
124
158
description : |
Original file line number Diff line number Diff line change
1
+ resource "google_firestore_database" "{{$.PrimaryResourceId}}" {
2
+ project = "{{index $.TestEnvVars "project_id"}}"
3
+ name = "{{index $.Vars "database_id"}}"
4
+ location_id = "nam5"
5
+ type = "FIRESTORE_NATIVE"
6
+ database_edition = "ENTERPRISE"
7
+ deletion_policy = "DELETE"
8
+ }
Original file line number Diff line number Diff line change @@ -9,12 +9,13 @@ resource "google_firestore_database" "database" {
9
9
}
10
10
11
11
resource "google_firestore_index" "{{$.PrimaryResourceId}}" {
12
- project = "{{index $.TestEnvVars "project_id"}}"
12
+ project = "{{index $.TestEnvVars "project_id"}}"
13
13
database = google_firestore_database.database.name
14
14
collection = "atestcollection"
15
15
16
16
query_scope = "COLLECTION_RECURSIVE"
17
- api_scope = "DATASTORE_MODE_API"
17
+ api_scope = "DATASTORE_MODE_API"
18
+ density = "SPARSE_ALL"
18
19
19
20
fields {
20
21
field_path = "name"
Original file line number Diff line number Diff line change
1
+ resource "google_firestore_database" "database" {
2
+ project = "{{index $.TestEnvVars "project_id"}}"
3
+ name = "{{index $.Vars "database_id"}}"
4
+ location_id = "nam5"
5
+ type = "FIRESTORE_NATIVE"
6
+ database_edition = "ENTERPRISE"
7
+
8
+ delete_protection_state = "DELETE_PROTECTION_DISABLED"
9
+ deletion_policy = "DELETE"
10
+ }
11
+
12
+ resource "google_firestore_index" "{{$.PrimaryResourceId}}" {
13
+ project = "{{index $.TestEnvVars "project_id"}}"
14
+ database = google_firestore_database.database.name
15
+ collection = "atestcollection"
16
+
17
+ api_scope = "MONGODB_COMPATIBLE_API"
18
+ query_scope = "COLLECTION_GROUP"
19
+ multikey = true
20
+ density = "DENSE"
21
+
22
+ fields {
23
+ field_path = "name"
24
+ order = "ASCENDING"
25
+ }
26
+
27
+ fields {
28
+ field_path = "description"
29
+ order = "DESCENDING"
30
+ }
31
+ }
Original file line number Diff line number Diff line change
1
+ resource "google_firestore_database" "database" {
2
+ project = "{{index $.TestEnvVars "project_id"}}"
3
+ name = "{{index $.Vars "database_id"}}"
4
+ location_id = "nam5"
5
+ type = "FIRESTORE_NATIVE"
6
+ database_edition = "ENTERPRISE"
7
+
8
+ delete_protection_state = "DELETE_PROTECTION_DISABLED"
9
+ deletion_policy = "DELETE"
10
+ }
11
+
12
+ resource "google_firestore_index" "{{$.PrimaryResourceId}}" {
13
+ project = "{{index $.TestEnvVars "project_id"}}"
14
+ database = google_firestore_database.database.name
15
+ collection = "atestcollection"
16
+
17
+ api_scope = "MONGODB_COMPATIBLE_API"
18
+ query_scope = "COLLECTION_GROUP"
19
+ multikey = true
20
+ density = "SPARSE_ANY"
21
+
22
+ fields {
23
+ field_path = "name"
24
+ order = "ASCENDING"
25
+ }
26
+
27
+ fields {
28
+ field_path = "description"
29
+ order = "DESCENDING"
30
+ }
31
+ }
You can’t perform that action at this time.
0 commit comments