generated from hashicorp/terraform-provider-scaffolding
/
endpoint_access_singular_data_source_gen.go
311 lines (298 loc) · 11.6 KB
/
endpoint_access_singular_data_source_gen.go
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
// Code generated by generators/singular-data-source/main.go; DO NOT EDIT.
package redshift
import (
"context"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-provider-awscc/internal/generic"
"github.com/hashicorp/terraform-provider-awscc/internal/registry"
)
func init() {
registry.AddDataSourceFactory("awscc_redshift_endpoint_access", endpointAccessDataSource)
}
// endpointAccessDataSource returns the Terraform awscc_redshift_endpoint_access data source.
// This Terraform data source corresponds to the CloudFormation AWS::Redshift::EndpointAccess resource.
func endpointAccessDataSource(ctx context.Context) (datasource.DataSource, error) {
attributes := map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Address
// CloudFormation resource type schema:
//
// {
// "description": "The DNS address of the endpoint.",
// "type": "string"
// }
"address": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The DNS address of the endpoint.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: ClusterIdentifier
// CloudFormation resource type schema:
//
// {
// "description": "A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. All alphabetical characters must be lower case, no hypens at the end, no two consecutive hyphens. Cluster name should be unique for all clusters within an AWS account",
// "type": "string"
// }
"cluster_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. All alphabetical characters must be lower case, no hypens at the end, no two consecutive hyphens. Cluster name should be unique for all clusters within an AWS account",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: EndpointCreateTime
// CloudFormation resource type schema:
//
// {
// "description": "The time (UTC) that the endpoint was created.",
// "type": "string"
// }
"endpoint_create_time": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The time (UTC) that the endpoint was created.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: EndpointName
// CloudFormation resource type schema:
//
// {
// "description": "The name of the endpoint.",
// "pattern": "",
// "type": "string"
// }
"endpoint_name": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The name of the endpoint.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: EndpointStatus
// CloudFormation resource type schema:
//
// {
// "description": "The status of the endpoint.",
// "type": "string"
// }
"endpoint_status": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The status of the endpoint.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Port
// CloudFormation resource type schema:
//
// {
// "description": "The port number on which the cluster accepts incoming connections.",
// "type": "integer"
// }
"port": schema.Int64Attribute{ /*START ATTRIBUTE*/
Description: "The port number on which the cluster accepts incoming connections.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: ResourceOwner
// CloudFormation resource type schema:
//
// {
// "description": "The AWS account ID of the owner of the cluster.",
// "pattern": "^\\d{12}$",
// "type": "string"
// }
"resource_owner": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The AWS account ID of the owner of the cluster.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: SubnetGroupName
// CloudFormation resource type schema:
//
// {
// "description": "The subnet group name where Amazon Redshift chooses to deploy the endpoint.",
// "pattern": "",
// "type": "string"
// }
"subnet_group_name": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The subnet group name where Amazon Redshift chooses to deploy the endpoint.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: VpcEndpoint
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "The connection endpoint for connecting to an Amazon Redshift cluster through the proxy.",
// "properties": {
// "NetworkInterfaces": {
// "description": "One or more network interfaces of the endpoint. Also known as an interface endpoint.",
// "insertionOrder": false,
// "items": {
// "additionalProperties": false,
// "description": "Describes a network interface.",
// "properties": {
// "AvailabilityZone": {
// "description": "The Availability Zone.",
// "type": "string"
// },
// "NetworkInterfaceId": {
// "description": "The network interface identifier.",
// "type": "string"
// },
// "PrivateIpAddress": {
// "description": "The IPv4 address of the network interface within the subnet.",
// "type": "string"
// },
// "SubnetId": {
// "description": "The subnet identifier.",
// "type": "string"
// }
// },
// "type": "object"
// },
// "type": "array"
// },
// "VpcEndpointId": {
// "description": "The connection endpoint ID for connecting an Amazon Redshift cluster through the proxy.",
// "type": "string"
// },
// "VpcId": {
// "description": "The VPC identifier that the endpoint is associated.",
// "type": "string"
// }
// },
// "type": "object"
// }
"vpc_endpoint": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: NetworkInterfaces
"network_interfaces": schema.ListNestedAttribute{ /*START ATTRIBUTE*/
NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: AvailabilityZone
"availability_zone": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The Availability Zone.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: NetworkInterfaceId
"network_interface_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The network interface identifier.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: PrivateIpAddress
"private_ip_address": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The IPv4 address of the network interface within the subnet.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: SubnetId
"subnet_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The subnet identifier.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
}, /*END NESTED OBJECT*/
Description: "One or more network interfaces of the endpoint. Also known as an interface endpoint.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: VpcEndpointId
"vpc_endpoint_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The connection endpoint ID for connecting an Amazon Redshift cluster through the proxy.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: VpcId
"vpc_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The VPC identifier that the endpoint is associated.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "The connection endpoint for connecting to an Amazon Redshift cluster through the proxy.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: VpcSecurityGroupIds
// CloudFormation resource type schema:
//
// {
// "description": "A list of vpc security group ids to apply to the created endpoint access.",
// "insertionOrder": false,
// "items": {
// "type": "string"
// },
// "type": "array"
// }
"vpc_security_group_ids": schema.ListAttribute{ /*START ATTRIBUTE*/
ElementType: types.StringType,
Description: "A list of vpc security group ids to apply to the created endpoint access.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: VpcSecurityGroups
// CloudFormation resource type schema:
//
// {
// "description": "A list of Virtual Private Cloud (VPC) security groups to be associated with the endpoint.",
// "insertionOrder": false,
// "items": {
// "additionalProperties": false,
// "description": "Describes the members of a VPC security group.",
// "properties": {
// "Status": {
// "description": "The status of the VPC security group.",
// "type": "string"
// },
// "VpcSecurityGroupId": {
// "description": "The identifier of the VPC security group.",
// "type": "string"
// }
// },
// "type": "object"
// },
// "type": "array"
// }
"vpc_security_groups": schema.ListNestedAttribute{ /*START ATTRIBUTE*/
NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Status
"status": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The status of the VPC security group.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: VpcSecurityGroupId
"vpc_security_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The identifier of the VPC security group.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
}, /*END NESTED OBJECT*/
Description: "A list of Virtual Private Cloud (VPC) security groups to be associated with the endpoint.",
Computed: true,
}, /*END ATTRIBUTE*/
} /*END SCHEMA*/
attributes["id"] = schema.StringAttribute{
Description: "Uniquely identifies the resource.",
Required: true,
}
schema := schema.Schema{
Description: "Data Source schema for AWS::Redshift::EndpointAccess",
Attributes: attributes,
}
var opts generic.DataSourceOptions
opts = opts.WithCloudFormationTypeName("AWS::Redshift::EndpointAccess").WithTerraformTypeName("awscc_redshift_endpoint_access")
opts = opts.WithTerraformSchema(schema)
opts = opts.WithAttributeNameMap(map[string]string{
"address": "Address",
"availability_zone": "AvailabilityZone",
"cluster_identifier": "ClusterIdentifier",
"endpoint_create_time": "EndpointCreateTime",
"endpoint_name": "EndpointName",
"endpoint_status": "EndpointStatus",
"network_interface_id": "NetworkInterfaceId",
"network_interfaces": "NetworkInterfaces",
"port": "Port",
"private_ip_address": "PrivateIpAddress",
"resource_owner": "ResourceOwner",
"status": "Status",
"subnet_group_name": "SubnetGroupName",
"subnet_id": "SubnetId",
"vpc_endpoint": "VpcEndpoint",
"vpc_endpoint_id": "VpcEndpointId",
"vpc_id": "VpcId",
"vpc_security_group_id": "VpcSecurityGroupId",
"vpc_security_group_ids": "VpcSecurityGroupIds",
"vpc_security_groups": "VpcSecurityGroups",
})
v, err := generic.NewSingularDataSource(ctx, opts...)
if err != nil {
return nil, err
}
return v, nil
}