|
| 1 | +# Copyright 2024 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: 'InstanceDesiredUserCreatedEndpoints' |
| 16 | +api_resource_type_kind: Instance |
| 17 | +description: | |
| 18 | + Manages user created connections for Memorystore instance |
| 19 | +docs: |
| 20 | + note: | |
| 21 | + Please ensure your connections meet the requirements outlined at |
| 22 | + https://cloud.devsite.corp.google.com/memorystore/docs/valkey/about-multiple-vpc-networking#application_connection_requirements. |
| 23 | + If you remove a connections item from the resource, the corresponding forwarding rule will no longer be functioning. |
| 24 | + If the corresponding forwarding rule is represented in your terraform configuration it is recommended to delete that |
| 25 | + `google_compute_forwarding_rule` resource at the same time. |
| 26 | +references: |
| 27 | + guides: |
| 28 | + api: 'https://cloud.google.com/memorystore/docs/valkey/reference/rest/v1/projects.locations.instances' |
| 29 | +id_format: 'projects/{{project}}/locations/{{region}}/instances/{{name}}' |
| 30 | +base_url: 'projects/{{project}}/locations/{{region}}/instances' |
| 31 | +self_link: 'projects/{{project}}/locations/{{region}}/instances/{{name}}' |
| 32 | +create_url: 'projects/{{project}}/locations/{{region}}/instances/{{name}}?updateMask=endpoints' |
| 33 | +create_verb: PATCH |
| 34 | +update_verb: 'PATCH' |
| 35 | +update_url: 'projects/{{project}}/locations/{{region}}/instances/{{name}}?updateMask=endpoints' |
| 36 | +update_mask: true |
| 37 | +custom_code: |
| 38 | + custom_delete: 'templates/terraform/custom_delete/memorystore_instance_desired_user_created_endpoints.go.tmpl' |
| 39 | +timeouts: |
| 40 | + insert_minutes: 60 |
| 41 | + update_minutes: 120 |
| 42 | + delete_minutes: 30 |
| 43 | +autogen_async: true |
| 44 | +async: |
| 45 | + actions: ['create', 'delete', 'update'] |
| 46 | + type: 'OpAsync' |
| 47 | + operation: |
| 48 | + base_url: '{{op_id}}' |
| 49 | + result: |
| 50 | + resource_inside_response: false |
| 51 | +examples: |
| 52 | + - name: 'memorystore_instance_desired_user_created_endpoints' |
| 53 | + primary_resource_id: 'instance-user-conn' |
| 54 | + vars: |
| 55 | + instance_name: 'instance-user-conn' |
| 56 | + network1_name: 'net1' |
| 57 | + subnet_network1_name: 'subnet-net1' |
| 58 | + ip1_network1_name: 'ip1-net1' |
| 59 | + ip2_network1_name: 'ip2-net1' |
| 60 | + forwarding_rule1_network1_name: 'fwd1-net1' |
| 61 | + forwarding_rule2_network1_name: 'fwd2-net1' |
| 62 | + network2_name: 'network2' |
| 63 | + subnet_network2_name: 'subnet-net2' |
| 64 | + ip1_network2_name: 'ip1-net2' |
| 65 | + ip2_network2_name: 'ip2-net2' |
| 66 | + forwarding_rule1_network2_name: 'fwd1-net2' |
| 67 | + forwarding_rule2_network2_name: 'fwd2-net2' |
| 68 | + - name: 'memorystore_instance_desired_user_and_auto_created_endpoints' |
| 69 | + primary_resource_id: 'instance-user-auto-conn' |
| 70 | + vars: |
| 71 | + instance_name: 'instance-user-auto-conn' |
| 72 | + network1_name: 'net1' |
| 73 | + subnet_network1_name: 'subnet-net1' |
| 74 | + policy_name: 'scpolicy' |
| 75 | + network2_name: 'network2' |
| 76 | + subnet_network2_name: 'subnet-net2' |
| 77 | + ip1_network2_name: 'ip1-net2' |
| 78 | + ip2_network2_name: 'ip2-net2' |
| 79 | + forwarding_rule1_network2_name: 'fwd1-net2' |
| 80 | + forwarding_rule2_network2_name: 'fwd2-net2' |
| 81 | +parameters: |
| 82 | + - name: 'name' |
| 83 | + type: String |
| 84 | + description: | |
| 85 | + The name of the Memorystore instance these endpoints should be added to. |
| 86 | + required: true |
| 87 | + url_param_only: true |
| 88 | + - name: 'region' |
| 89 | + type: String |
| 90 | + description: | |
| 91 | + The name of the region of the Memorystore instance these endpoints should be added to. |
| 92 | + url_param_only: true |
| 93 | + required: true |
| 94 | +properties: |
| 95 | + - name: 'desiredUserCreatedEndpoints' |
| 96 | + api_name: 'endpoints' |
| 97 | + type: Array |
| 98 | + description: "A list of desired user endpoints" |
| 99 | + custom_flatten: 'templates/terraform/custom_flatten/memorystore_instance_desired_user_created_connections_desired_endpoints.go.tmpl' |
| 100 | + item_type: |
| 101 | + type: NestedObject |
| 102 | + description: | |
| 103 | + Instance Endpoint consists of PSC connections that are created |
| 104 | + as a group in each VPC network for accessing the Instance. In each group, |
| 105 | + there shall be one connection for each service attachment in the Instance. |
| 106 | + properties: |
| 107 | + - name: connections |
| 108 | + type: Array |
| 109 | + item_type: |
| 110 | + type: NestedObject |
| 111 | + name: 'connections' |
| 112 | + properties: |
| 113 | + - name: 'pscConnection' |
| 114 | + type: NestedObject |
| 115 | + description: | |
| 116 | + Detailed information of a PSC connection that is created by the customer |
| 117 | + who owns the cluster. |
| 118 | + properties: |
| 119 | + - name: 'pscConnectionId' |
| 120 | + type: String |
| 121 | + description: |
| 122 | + "The PSC connection id of the forwarding rule connected |
| 123 | + to the\nservice attachment." |
| 124 | + required: true |
| 125 | + - name: 'ipAddress' |
| 126 | + type: String |
| 127 | + description: |
| 128 | + "The IP allocated on the consumer network for the |
| 129 | + PSC forwarding rule. " |
| 130 | + required: true |
| 131 | + - name: 'forwardingRule' |
| 132 | + type: String |
| 133 | + description: "The URI of the consumer side forwarding rule.\nFormat:\nprojects/{project}/regions/{region}/forwardingRules/{forwarding_rule} " |
| 134 | + required: true |
| 135 | + - name: 'projectId' |
| 136 | + type: String |
| 137 | + description: |
| 138 | + "The consumer project_id where the forwarding rule is |
| 139 | + created from. " |
| 140 | + default_from_api: true |
| 141 | + - name: 'network' |
| 142 | + type: String |
| 143 | + description: |
| 144 | + "The consumer network where the IP address resides, in |
| 145 | + the form of\nprojects/{project_id}/global/networks/{network_id}. " |
| 146 | + required: true |
| 147 | + - name: 'serviceAttachment' |
| 148 | + type: String |
| 149 | + description: |
| 150 | + "The service attachment which is the target of the PSC connection, in the form of |
| 151 | + projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}." |
| 152 | + required: true |
| 153 | + - name: 'pscConnectionStatus' |
| 154 | + type: Enum |
| 155 | + description: |
| 156 | + "Output Only. The status of the PSC connection: whether a connection exists and ACTIVE or it no longer exists. |
| 157 | + \n Possible values:\n ACTIVE \n NOT_FOUND" |
| 158 | + output: true |
| 159 | + - name: 'connectionType' |
| 160 | + type: Enum |
| 161 | + description: |
| 162 | + "Output Only. Type of a PSC Connection. |
| 163 | + \n Possible values:\n CONNECTION_TYPE_DISCOVERY \n CONNECTION_TYPE_PRIMARY \n CONNECTION_TYPE_READER" |
| 164 | + output: true |
0 commit comments