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