|
| 1 | +# Copyright 2025 Google Inc. |
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | +# you may not use this file except in compliance with the License. |
| 4 | +# You may obtain a copy of the License at |
| 5 | +# |
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# |
| 8 | +# Unless required by applicable law or agreed to in writing, software |
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +# See the License for the specific language governing permissions and |
| 12 | +# limitations under the License. |
| 13 | + |
| 14 | +--- |
| 15 | +name: 'UserCreds' |
| 16 | +description: | |
| 17 | + User credentials for a Cloud Firestore with MongoDB compatibility database. |
| 18 | + The resource is owned by the database and is deleted along with the database. |
| 19 | +references: |
| 20 | + guides: |
| 21 | + 'Authenticate and connect to a database': 'https://cloud.google.com/firestore/mongodb-compatibility/docs/connect' |
| 22 | + api: 'https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases.userCreds' |
| 23 | +base_url: 'projects/{{project}}/databases/{{database}}/userCreds' |
| 24 | +self_link: 'projects/{{project}}/databases/{{database}}/userCreds/{{name}}' |
| 25 | +immutable: true |
| 26 | +create_url: 'projects/{{project}}/databases/{{database}}/userCreds?userCredsId={{name}}' |
| 27 | +autogen_async: false |
| 28 | +custom_code: |
| 29 | + post_create: templates/terraform/post_create/firestore_user_creds.go.tmpl |
| 30 | +examples: |
| 31 | + - name: 'firestore_user_creds_basic' |
| 32 | + primary_resource_id: 'my-user-creds' |
| 33 | + vars: |
| 34 | + database_id: 'database-id-mongodb-compatible' |
| 35 | + test_env_vars: |
| 36 | + project_id: 'PROJECT_NAME' |
| 37 | + - name: 'firestore_user_creds_with_secret_manager' |
| 38 | + primary_resource_id: 'my-user-creds' |
| 39 | + vars: |
| 40 | + database_id: 'database-id-mongodb-compatible' |
| 41 | + test_env_vars: |
| 42 | + project_id: 'PROJECT_NAME' |
| 43 | +parameters: |
| 44 | + - name: 'database' |
| 45 | + type: String |
| 46 | + description: | |
| 47 | + The Firestore database ID. |
| 48 | + required: true |
| 49 | + url_param_only: true |
| 50 | + - name: 'name' |
| 51 | + type: String |
| 52 | + description: | |
| 53 | + The ID to use for the user creds, which will become the final component |
| 54 | + of the user cred's resource name. |
| 55 | +
|
| 56 | + This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ |
| 57 | + with first character a letter and the last a letter or a number. Must not |
| 58 | + be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. |
| 59 | + required: true |
| 60 | + custom_flatten: 'templates/terraform/custom_flatten/name_from_self_link.tmpl' |
| 61 | + custom_expand: 'templates/terraform/custom_expand/shortname_to_url.go.tmpl' |
| 62 | +properties: |
| 63 | + - name: 'createTime' |
| 64 | + type: String |
| 65 | + description: | |
| 66 | + The timestamp at which these user creds were created. |
| 67 | + output: true |
| 68 | + - name: 'updateTime' |
| 69 | + type: String |
| 70 | + description: | |
| 71 | + The timestamp at which these user creds were updated. |
| 72 | + output: true |
| 73 | + - name: 'state' |
| 74 | + type: String |
| 75 | + description: | |
| 76 | + The state of the user creds. |
| 77 | + output: true |
| 78 | + - name: 'securePassword' |
| 79 | + type: String |
| 80 | + description: | |
| 81 | + The plaintext server-generated password for the user creds. |
| 82 | + output: true |
| 83 | + sensitive: true |
| 84 | + # Only returned in the create call. |
| 85 | + ignore_read: true |
| 86 | + - name: 'resourceIdentity' |
| 87 | + type: NestedObject |
| 88 | + description: | |
| 89 | + Describes the Resource Identity principal. |
| 90 | + output: true |
| 91 | + properties: |
| 92 | + - name: 'principal' |
| 93 | + type: String |
| 94 | + description: | |
| 95 | + The principal identifier string. |
| 96 | + See https://cloud.google.com/iam/docs/principal-identifiers. |
| 97 | + output: true |
0 commit comments