diff --git a/mmv1/products/datastore/Index.yaml b/mmv1/products/datastore/Index.yaml deleted file mode 100644 index 1b21fdac10da..000000000000 --- a/mmv1/products/datastore/Index.yaml +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2023 Google Inc. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- !ruby/object:Api::Resource -name: 'Index' -base_url: 'projects/{{project}}/indexes' -self_link: 'projects/{{project}}/indexes/{{index_id}}' -immutable: true -collection_url_key: indexes -references: !ruby/object:Api::Resource::ReferenceLinks - guides: - 'Official Documentation': 'https://cloud.google.com/datastore/docs/concepts/indexes' - api: 'https://cloud.google.com/datastore/docs/reference/admin/rest/v1/projects.indexes' -identity: - - indexId -description: | - Describes a composite index for Firestore in Datastore Mode. -id_format: 'projects/{{project}}/indexes/{{index_id}}' -error_retry_predicates: ['transport_tpg.DatastoreIndex409Contention'] -autogen_async: true -timeouts: !ruby/object:Api::Timeouts - insert_minutes: 20 - delete_minutes: 20 -deprecation_message: >- - `datastore_index` is deprecated and will be removed in a future major release. - Use `firestore_index` instead; this resource is deprecated because it only supports the (default) database. - `firestore_index` supports both Firestore in Datastore Mode and Firestore Native indexes and supports both - named and the (default) database. -docs: !ruby/object:Provider::Terraform::Docs - warning: | - `datastore_index` is deprecated and will be removed in a future major release. - Use `firestore_index` instead; this resource is deprecated because it only supports the (default) database. - This resource creates a Datastore Index on a project that has already - enabled a Datastore-compatible database. If you haven't already created it, you may - create a `google_firestore_database` resource with `location_id` set - to your chosen location, and `type` set to `"DATASTORE_MODE"`. - If you wish to use App Engine, you may instead create a `google_app_engine_application` resource with - `database_type` set to `"CLOUD_DATASTORE_COMPATIBILITY"`. - Your Datastore location will be the same as the App Engine location specified. -examples: - - !ruby/object:Provider::Terraform::Examples - name: 'datastore_index' - primary_resource_id: 'default' - test_env_vars: - project_id: :PROJECT_NAME - vars: - property_name_1: 'property_a' - property_name_2: 'property_b' -properties: - - !ruby/object:Api::Type::String - name: 'indexId' - output: true - description: | - The index id. - - !ruby/object:Api::Type::String - name: 'kind' - required: true - description: | - The entity kind which the index applies to. - - !ruby/object:Api::Type::Enum - name: 'ancestor' - default_value: :NONE - values: - - :NONE - - :ALL_ANCESTORS - description: | - Policy for including ancestors in the index. - - !ruby/object:Api::Type::Array - name: 'properties' - description: | - An ordered list of properties to index on. - min_size: 1 - item_type: !ruby/object:Api::Type::NestedObject - properties: - - !ruby/object:Api::Type::String - name: 'name' - required: true - description: | - The property name to index. - - !ruby/object:Api::Type::Enum - name: 'direction' - required: true - values: - - :ASCENDING - - :DESCENDING - description: | - The direction the index should optimize for sorting. diff --git a/mmv1/products/datastore/go_Index.yaml b/mmv1/products/datastore/go_Index.yaml deleted file mode 100644 index c4b747f7cfe7..000000000000 --- a/mmv1/products/datastore/go_Index.yaml +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright 2024 Google Inc. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Warning: This is a temporary file, and should not be edited directly ---- -name: 'Index' -description: | - Describes a composite index for Firestore in Datastore Mode. -references: - guides: - 'Official Documentation': 'https://cloud.google.com/datastore/docs/concepts/indexes' - api: 'https://cloud.google.com/datastore/docs/reference/admin/rest/v1/projects.indexes' -docs: - warning: | - `datastore_index` is deprecated and will be removed in a future major release. - Use `firestore_index` instead; this resource is deprecated because it only supports the (default) database. - This resource creates a Datastore Index on a project that has already - enabled a Datastore-compatible database. If you haven't already created it, you may - create a `google_firestore_database` resource with `location_id` set - to your chosen location, and `type` set to `"DATASTORE_MODE"`. - If you wish to use App Engine, you may instead create a `google_app_engine_application` resource with - `database_type` set to `"CLOUD_DATASTORE_COMPATIBILITY"`. - Your Datastore location will be the same as the App Engine location specified. -id_format: 'projects/{{project}}/indexes/{{index_id}}' -base_url: 'projects/{{project}}/indexes' -self_link: 'projects/{{project}}/indexes/{{index_id}}' -immutable: true -timeouts: - insert_minutes: 20 - update_minutes: 20 - delete_minutes: 20 -autogen_async: true -async: - actions: ['create', 'delete', 'update'] - type: 'OpAsync' - operation: - base_url: '{{op_id}}' - path: 'name' - wait_ms: 1000 - result: - path: 'response' - resource_inside_response: true - error: - path: 'error' - message: 'message' -collection_url_key: 'indexes' -identity: - - indexId -custom_code: -error_retry_predicates: - - - 'transport_tpg.DatastoreIndex409Contention' -deprecation_message: '`datastore_index` is deprecated and will be removed in a future major release. Use `firestore_index` instead; this resource is deprecated because it only supports the (default) database. `firestore_index` supports both Firestore in Datastore Mode and Firestore Native indexes and supports both named and the (default) database.' -examples: - - name: 'datastore_index' - primary_resource_id: 'default' - vars: - property_name_1: 'property_a' - property_name_2: 'property_b' - test_env_vars: - project_id: 'PROJECT_NAME' -parameters: -properties: - - name: 'indexId' - type: String - description: | - The index id. - output: true - - name: 'kind' - type: String - description: | - The entity kind which the index applies to. - required: true - - name: 'ancestor' - type: Enum - description: | - Policy for including ancestors in the index. - default_value: "NONE" - enum_values: - - 'NONE' - - 'ALL_ANCESTORS' - - name: 'properties' - type: Array - description: | - An ordered list of properties to index on. - item_type: - type: NestedObject - properties: - - name: 'name' - type: String - description: | - The property name to index. - required: true - - name: 'direction' - type: Enum - description: | - The direction the index should optimize for sorting. - required: true - enum_values: - - 'ASCENDING' - - 'DESCENDING' - min_size: 1 diff --git a/mmv1/products/datastore/go_product.yaml b/mmv1/products/datastore/go_product.yaml deleted file mode 100644 index 548d34378a8a..000000000000 --- a/mmv1/products/datastore/go_product.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2024 Google Inc. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Warning: This is a temporary file, and should not be edited directly ---- -name: 'Datastore' -display_name: 'Datastore' -versions: - - name: 'ga' - base_url: 'https://datastore.googleapis.com/v1/' -scopes: - - 'https://www.googleapis.com/auth/datastore' -async: - type: "OpAsync" - operation: - base_url: '{{op_id}}' - path: 'name' - wait_ms: 1000 - result: - path: 'response' - resource_inside_response: true - error: - path: 'error' - message: 'message' diff --git a/mmv1/products/datastore/product.yaml b/mmv1/products/datastore/product.yaml deleted file mode 100644 index 9326be25fa83..000000000000 --- a/mmv1/products/datastore/product.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2020 Google Inc. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- !ruby/object:Api::Product -name: Datastore -versions: - - !ruby/object:Api::Product::Version - name: ga - base_url: https://datastore.googleapis.com/v1/ -scopes: - - https://www.googleapis.com/auth/datastore -async: !ruby/object:Api::OpAsync - operation: !ruby/object:Api::OpAsync::Operation - path: 'name' - base_url: '{{op_id}}' - wait_ms: 1000 - result: !ruby/object:Api::OpAsync::Result - path: 'response' - resource_inside_response: true - status: !ruby/object:Api::OpAsync::Status - path: 'done' - complete: true - allowed: - - true - - false - error: !ruby/object:Api::OpAsync::Error - path: 'error' - message: 'message' diff --git a/mmv1/templates/terraform/examples/datastore_index.tf.erb b/mmv1/templates/terraform/examples/datastore_index.tf.erb deleted file mode 100644 index 8e1917ffad40..000000000000 --- a/mmv1/templates/terraform/examples/datastore_index.tf.erb +++ /dev/null @@ -1,26 +0,0 @@ -resource "google_firestore_database" "database" { - project = "<%= ctx[:test_env_vars]['project_id'] %>" - # google_datastore_index resources only support the (default) database. - # However, google_firestore_index can express any Datastore Mode index - # and should be preferred in all cases. - name = "(default)" - location_id = "nam5" - type = "DATASTORE_MODE" - - delete_protection_state = "DELETE_PROTECTION_DISABLED" - deletion_policy = "DELETE" -} - -resource "google_datastore_index" "<%= ctx[:primary_resource_id] %>" { - kind = "foo" - properties { - name = "<%= ctx[:vars]['property_name_1'] %>" - direction = "ASCENDING" - } - properties { - name = "<%= ctx[:vars]['property_name_2'] %>" - direction = "ASCENDING" - } - - depends_on = [google_firestore_database.database] -} diff --git a/mmv1/templates/terraform/examples/go/datastore_index.tf.tmpl b/mmv1/templates/terraform/examples/go/datastore_index.tf.tmpl deleted file mode 100644 index d66ba3a1144a..000000000000 --- a/mmv1/templates/terraform/examples/go/datastore_index.tf.tmpl +++ /dev/null @@ -1,26 +0,0 @@ -resource "google_firestore_database" "database" { - project = "{{index $.TestEnvVars "project_id"}}" - # google_datastore_index resources only support the (default) database. - # However, google_firestore_index can express any Datastore Mode index - # and should be preferred in all cases. - name = "(default)" - location_id = "nam5" - type = "DATASTORE_MODE" - - delete_protection_state = "DELETE_PROTECTION_DISABLED" - deletion_policy = "DELETE" -} - -resource "google_datastore_index" "{{$.PrimaryResourceId}}" { - kind = "foo" - properties { - name = "{{index $.Vars "property_name_1"}}" - direction = "ASCENDING" - } - properties { - name = "{{index $.Vars "property_name_2"}}" - direction = "ASCENDING" - } - - depends_on = [google_firestore_database.database] -} diff --git a/mmv1/third_party/terraform/website/docs/guides/version_6_upgrade.html.markdown b/mmv1/third_party/terraform/website/docs/guides/version_6_upgrade.html.markdown index f1ed81419ba7..bb876936834b 100644 --- a/mmv1/third_party/terraform/website/docs/guides/version_6_upgrade.html.markdown +++ b/mmv1/third_party/terraform/website/docs/guides/version_6_upgrade.html.markdown @@ -253,7 +253,7 @@ and then run `terraform apply` to apply the change. ### `lifecycle_rule.condition.no_age` is now removed -Previously `lifecycle_rule.condition.age` attirbute was being set zero value by default and `lifecycle_rule.condition.no_age` was introduced to prevent that. +Previously `lifecycle_rule.condition.age` attribute was being set zero value by default and `lifecycle_rule.condition.no_age` was introduced to prevent that. Now `lifecycle_rule.condition.no_age` is no longer supported and `lifecycle_rule.condition.age` won't set a zero value by default. Removed in favor of the field `lifecycle_rule.condition.send_age_if_zero` which can be used to set zero value for `lifecycle_rule.condition.age` attribute. @@ -357,3 +357,7 @@ explicitly set this field to `DELETE` in your configuration and run `terraform a `skip_delete` value of `false` can be changed to a `deletion_policy` value of `DELETE` and a `skip_delete` value of `true` to a `deletion_policy` value of `ABANDON` for equivalent behavior. + +### Resource: `google_datastore_index` is now removed + +`google_datastore_index` is removed in favor of `google_firestore_index` diff --git a/tools/issue-labeler/labeler/enrolled_teams.yml b/tools/issue-labeler/labeler/enrolled_teams.yml index c589196da898..0c3a64cca6c4 100755 --- a/tools/issue-labeler/labeler/enrolled_teams.yml +++ b/tools/issue-labeler/labeler/enrolled_teams.yml @@ -350,7 +350,6 @@ service/firestore-controlplane: - google_firestore_database service/firestore-dataplane: resources: - - google_datastore_index - google_firestore_document - google_firestore_field - google_firestore_index