generated from hashicorp/terraform-provider-scaffolding
/
access_point_singular_data_source_gen.go
284 lines (271 loc) · 12.3 KB
/
access_point_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
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
// Code generated by generators/singular-data-source/main.go; DO NOT EDIT.
package efs
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_efs_access_point", accessPointDataSource)
}
// accessPointDataSource returns the Terraform awscc_efs_access_point data source.
// This Terraform data source corresponds to the CloudFormation AWS::EFS::AccessPoint resource.
func accessPointDataSource(ctx context.Context) (datasource.DataSource, error) {
attributes := map[string]schema.Attribute{ /*START SCHEMA*/
// Property: AccessPointId
// CloudFormation resource type schema:
//
// {
// "description": "",
// "type": "string"
// }
"access_point_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: AccessPointTags
// CloudFormation resource type schema:
//
// {
// "description": "An array of key-value pairs to apply to this resource.\n For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).",
// "insertionOrder": false,
// "items": {
// "additionalProperties": false,
// "description": "A tag is a key-value pair attached to a file system. Allowed characters in the ``Key`` and ``Value`` properties are letters, white space, and numbers that can be represented in UTF-8, and the following characters:``+ - = . _ : /``",
// "properties": {
// "Key": {
// "description": "The tag key (String). The key can't start with ``aws:``.",
// "maxLength": 128,
// "minLength": 1,
// "type": "string"
// },
// "Value": {
// "description": "The value of the tag key.",
// "maxLength": 256,
// "minLength": 1,
// "type": "string"
// }
// },
// "type": "object"
// },
// "type": "array",
// "uniqueItems": true
// }
"access_point_tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/
NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Key
"key": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The tag key (String). The key can't start with ``aws:``.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Value
"value": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The value of the tag key.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
}, /*END NESTED OBJECT*/
Description: "An array of key-value pairs to apply to this resource.\n For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Arn
// CloudFormation resource type schema:
//
// {
// "description": "",
// "type": "string"
// }
"arn": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: ClientToken
// CloudFormation resource type schema:
//
// {
// "description": "The opaque string specified in the request to ensure idempotent creation.",
// "type": "string"
// }
"client_token": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The opaque string specified in the request to ensure idempotent creation.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: FileSystemId
// CloudFormation resource type schema:
//
// {
// "description": "The ID of the EFS file system that the access point applies to. Accepts only the ID format for input when specifying a file system, for example ``fs-0123456789abcedf2``.",
// "type": "string"
// }
"file_system_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The ID of the EFS file system that the access point applies to. Accepts only the ID format for input when specifying a file system, for example ``fs-0123456789abcedf2``.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: PosixUser
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "The full POSIX identity, including the user ID, group ID, and secondary group IDs on the access point that is used for all file operations by NFS clients using the access point.",
// "properties": {
// "Gid": {
// "description": "The POSIX group ID used for all file system operations using this access point.",
// "type": "string"
// },
// "SecondaryGids": {
// "description": "Secondary POSIX group IDs used for all file system operations using this access point.",
// "items": {
// "type": "string"
// },
// "type": "array"
// },
// "Uid": {
// "description": "The POSIX user ID used for all file system operations using this access point.",
// "type": "string"
// }
// },
// "required": [
// "Uid",
// "Gid"
// ],
// "type": "object"
// }
"posix_user": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Gid
"gid": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The POSIX group ID used for all file system operations using this access point.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: SecondaryGids
"secondary_gids": schema.ListAttribute{ /*START ATTRIBUTE*/
ElementType: types.StringType,
Description: "Secondary POSIX group IDs used for all file system operations using this access point.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Uid
"uid": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The POSIX user ID used for all file system operations using this access point.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "The full POSIX identity, including the user ID, group ID, and secondary group IDs on the access point that is used for all file operations by NFS clients using the access point.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: RootDirectory
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "The directory on the EFS file system that the access point exposes as the root directory to NFS clients using the access point.",
// "properties": {
// "CreationInfo": {
// "additionalProperties": false,
// "description": "(Optional) Specifies the POSIX IDs and permissions to apply to the access point's ``RootDirectory``. If the ``RootDirectory`` \u003e ``Path`` specified does not exist, EFS creates the root directory using the ``CreationInfo`` settings when a client connects to an access point. When specifying the ``CreationInfo``, you must provide values for all properties. \n If you do not provide ``CreationInfo`` and the specified ``RootDirectory`` \u003e ``Path`` does not exist, attempts to mount the file system using the access point will fail.",
// "properties": {
// "OwnerGid": {
// "description": "Specifies the POSIX group ID to apply to the ``RootDirectory``. Accepts values from 0 to 2^32 (4294967295).",
// "type": "string"
// },
// "OwnerUid": {
// "description": "Specifies the POSIX user ID to apply to the ``RootDirectory``. Accepts values from 0 to 2^32 (4294967295).",
// "type": "string"
// },
// "Permissions": {
// "description": "Specifies the POSIX permissions to apply to the ``RootDirectory``, in the format of an octal number representing the file's mode bits.",
// "pattern": "^[0-7]{3,4}$",
// "type": "string"
// }
// },
// "required": [
// "OwnerUid",
// "OwnerGid",
// "Permissions"
// ],
// "type": "object"
// },
// "Path": {
// "description": "Specifies the path on the EFS file system to expose as the root directory to NFS clients using the access point to access the EFS file system. A path can have up to four subdirectories. If the specified path does not exist, you are required to provide the ``CreationInfo``.",
// "maxLength": 100,
// "minLength": 1,
// "type": "string"
// }
// },
// "type": "object"
// }
"root_directory": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: CreationInfo
"creation_info": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: OwnerGid
"owner_gid": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Specifies the POSIX group ID to apply to the ``RootDirectory``. Accepts values from 0 to 2^32 (4294967295).",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: OwnerUid
"owner_uid": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Specifies the POSIX user ID to apply to the ``RootDirectory``. Accepts values from 0 to 2^32 (4294967295).",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Permissions
"permissions": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Specifies the POSIX permissions to apply to the ``RootDirectory``, in the format of an octal number representing the file's mode bits.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "(Optional) Specifies the POSIX IDs and permissions to apply to the access point's ``RootDirectory``. If the ``RootDirectory`` > ``Path`` specified does not exist, EFS creates the root directory using the ``CreationInfo`` settings when a client connects to an access point. When specifying the ``CreationInfo``, you must provide values for all properties. \n If you do not provide ``CreationInfo`` and the specified ``RootDirectory`` > ``Path`` does not exist, attempts to mount the file system using the access point will fail.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Path
"path": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Specifies the path on the EFS file system to expose as the root directory to NFS clients using the access point to access the EFS file system. A path can have up to four subdirectories. If the specified path does not exist, you are required to provide the ``CreationInfo``.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "The directory on the EFS file system that the access point exposes as the root directory to NFS clients using the access point.",
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::EFS::AccessPoint",
Attributes: attributes,
}
var opts generic.DataSourceOptions
opts = opts.WithCloudFormationTypeName("AWS::EFS::AccessPoint").WithTerraformTypeName("awscc_efs_access_point")
opts = opts.WithTerraformSchema(schema)
opts = opts.WithAttributeNameMap(map[string]string{
"access_point_id": "AccessPointId",
"access_point_tags": "AccessPointTags",
"arn": "Arn",
"client_token": "ClientToken",
"creation_info": "CreationInfo",
"file_system_id": "FileSystemId",
"gid": "Gid",
"key": "Key",
"owner_gid": "OwnerGid",
"owner_uid": "OwnerUid",
"path": "Path",
"permissions": "Permissions",
"posix_user": "PosixUser",
"root_directory": "RootDirectory",
"secondary_gids": "SecondaryGids",
"uid": "Uid",
"value": "Value",
})
v, err := generic.NewSingularDataSource(ctx, opts...)
if err != nil {
return nil, err
}
return v, nil
}