generated from hashicorp/terraform-provider-scaffolding
/
environment_singular_data_source_gen.go
353 lines (340 loc) · 12.2 KB
/
environment_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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
// Code generated by generators/singular-data-source/main.go; DO NOT EDIT.
package datazone
import (
"context"
"github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes"
"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_datazone_environment", environmentDataSource)
}
// environmentDataSource returns the Terraform awscc_datazone_environment data source.
// This Terraform data source corresponds to the CloudFormation AWS::DataZone::Environment resource.
func environmentDataSource(ctx context.Context) (datasource.DataSource, error) {
attributes := map[string]schema.Attribute{ /*START SCHEMA*/
// Property: AwsAccountId
// CloudFormation resource type schema:
//
// {
// "description": "The AWS account in which the Amazon DataZone environment is created.",
// "pattern": "^\\d{12}$",
// "type": "string"
// }
"aws_account_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The AWS account in which the Amazon DataZone environment is created.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: AwsAccountRegion
// CloudFormation resource type schema:
//
// {
// "description": "The AWS region in which the Amazon DataZone environment is created.",
// "pattern": "^[a-z]{2}-[a-z]{4,10}-\\d$",
// "type": "string"
// }
"aws_account_region": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The AWS region in which the Amazon DataZone environment is created.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: CreatedAt
// CloudFormation resource type schema:
//
// {
// "description": "The timestamp of when the environment was created.",
// "format": "date-time",
// "type": "string"
// }
"created_at": schema.StringAttribute{ /*START ATTRIBUTE*/
CustomType: timetypes.RFC3339Type{},
Description: "The timestamp of when the environment was created.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: CreatedBy
// CloudFormation resource type schema:
//
// {
// "description": "The Amazon DataZone user who created the environment.",
// "type": "string"
// }
"created_by": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The Amazon DataZone user who created the environment.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Description
// CloudFormation resource type schema:
//
// {
// "description": "The description of the Amazon DataZone environment.",
// "maxLength": 2048,
// "type": "string"
// }
"description": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The description of the Amazon DataZone environment.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: DomainId
// CloudFormation resource type schema:
//
// {
// "description": "The identifier of the Amazon DataZone domain in which the environment is created.",
// "pattern": "^dzd[-_][a-zA-Z0-9_-]{1,36}$",
// "type": "string"
// }
"domain_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The identifier of the Amazon DataZone domain in which the environment is created.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: DomainIdentifier
// CloudFormation resource type schema:
//
// {
// "description": "The identifier of the Amazon DataZone domain in which the environment would be created.",
// "pattern": "^dzd[-_][a-zA-Z0-9_-]{1,36}$",
// "type": "string"
// }
"domain_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The identifier of the Amazon DataZone domain in which the environment would be created.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: EnvironmentBlueprintId
// CloudFormation resource type schema:
//
// {
// "description": "The ID of the blueprint with which the Amazon DataZone environment was created.",
// "pattern": "^[a-zA-Z0-9_-]{1,36}$",
// "type": "string"
// }
"environment_blueprint_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The ID of the blueprint with which the Amazon DataZone environment was created.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: EnvironmentProfileId
// CloudFormation resource type schema:
//
// {
// "description": "The ID of the environment profile with which the Amazon DataZone environment was created.",
// "pattern": "^[a-zA-Z0-9_-]{1,36}$",
// "type": "string"
// }
"environment_profile_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The ID of the environment profile with which the Amazon DataZone environment was created.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: EnvironmentProfileIdentifier
// CloudFormation resource type schema:
//
// {
// "description": "The ID of the environment profile with which the Amazon DataZone environment would be created.",
// "pattern": "^[a-zA-Z0-9_-]{1,36}$",
// "type": "string"
// }
"environment_profile_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The ID of the environment profile with which the Amazon DataZone environment would be created.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: GlossaryTerms
// CloudFormation resource type schema:
//
// {
// "description": "The glossary terms that can be used in the Amazon DataZone environment.",
// "insertionOrder": false,
// "items": {
// "pattern": "^[a-zA-Z0-9_-]{1,36}$",
// "type": "string"
// },
// "maxItems": 20,
// "minItems": 1,
// "type": "array"
// }
"glossary_terms": schema.ListAttribute{ /*START ATTRIBUTE*/
ElementType: types.StringType,
Description: "The glossary terms that can be used in the Amazon DataZone environment.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Id
// CloudFormation resource type schema:
//
// {
// "description": "The ID of the Amazon DataZone environment.",
// "pattern": "^[a-zA-Z0-9_-]{1,36}$",
// "type": "string"
// }
"environment_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The ID of the Amazon DataZone environment.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Name
// CloudFormation resource type schema:
//
// {
// "description": "The name of the environment.",
// "maxLength": 64,
// "minLength": 1,
// "pattern": "^[\\w -]+$",
// "type": "string"
// }
"name": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The name of the environment.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: ProjectId
// CloudFormation resource type schema:
//
// {
// "description": "The ID of the Amazon DataZone project in which the environment is created.",
// "pattern": "^[a-zA-Z0-9_-]{1,36}$",
// "type": "string"
// }
"project_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The ID of the Amazon DataZone project in which the environment is created.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: ProjectIdentifier
// CloudFormation resource type schema:
//
// {
// "description": "The ID of the Amazon DataZone project in which the environment would be created.",
// "pattern": "^[a-zA-Z0-9_-]{1,36}$",
// "type": "string"
// }
"project_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The ID of the Amazon DataZone project in which the environment would be created.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Provider
// CloudFormation resource type schema:
//
// {
// "description": "The provider of the Amazon DataZone environment.",
// "type": "string"
// }
"provider_name": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The provider of the Amazon DataZone environment.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Status
// CloudFormation resource type schema:
//
// {
// "description": "The status of the Amazon DataZone environment.",
// "enum": [
// "ACTIVE",
// "CREATING",
// "UPDATING",
// "DELETING",
// "CREATE_FAILED",
// "UPDATE_FAILED",
// "DELETE_FAILED",
// "VALIDATION_FAILED",
// "SUSPENDED",
// "DISABLED",
// "EXPIRED",
// "DELETED",
// "INACCESSIBLE"
// ],
// "type": "string"
// }
"status": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The status of the Amazon DataZone environment.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: UpdatedAt
// CloudFormation resource type schema:
//
// {
// "description": "The timestamp of when the environment was updated.",
// "format": "date-time",
// "type": "string"
// }
"updated_at": schema.StringAttribute{ /*START ATTRIBUTE*/
CustomType: timetypes.RFC3339Type{},
Description: "The timestamp of when the environment was updated.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: UserParameters
// CloudFormation resource type schema:
//
// {
// "description": "The user parameters of the Amazon DataZone environment.",
// "insertionOrder": false,
// "items": {
// "additionalProperties": false,
// "description": "The parameter details of an environment.",
// "properties": {
// "Name": {
// "description": "The name of an environment parameter.",
// "type": "string"
// },
// "Value": {
// "description": "The value of an environment parameter.",
// "type": "string"
// }
// },
// "type": "object"
// },
// "type": "array"
// }
"user_parameters": schema.ListNestedAttribute{ /*START ATTRIBUTE*/
NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Name
"name": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The name of an environment parameter.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Value
"value": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The value of an environment parameter.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
}, /*END NESTED OBJECT*/
Description: "The user parameters of the Amazon DataZone environment.",
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::DataZone::Environment",
Attributes: attributes,
}
var opts generic.DataSourceOptions
opts = opts.WithCloudFormationTypeName("AWS::DataZone::Environment").WithTerraformTypeName("awscc_datazone_environment")
opts = opts.WithTerraformSchema(schema)
opts = opts.WithAttributeNameMap(map[string]string{
"aws_account_id": "AwsAccountId",
"aws_account_region": "AwsAccountRegion",
"created_at": "CreatedAt",
"created_by": "CreatedBy",
"description": "Description",
"domain_id": "DomainId",
"domain_identifier": "DomainIdentifier",
"environment_blueprint_id": "EnvironmentBlueprintId",
"environment_id": "Id",
"environment_profile_id": "EnvironmentProfileId",
"environment_profile_identifier": "EnvironmentProfileIdentifier",
"glossary_terms": "GlossaryTerms",
"name": "Name",
"project_id": "ProjectId",
"project_identifier": "ProjectIdentifier",
"provider_name": "Provider",
"status": "Status",
"updated_at": "UpdatedAt",
"user_parameters": "UserParameters",
"value": "Value",
})
v, err := generic.NewSingularDataSource(ctx, opts...)
if err != nil {
return nil, err
}
return v, nil
}