generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 110
/
instance_access_control_attribute_configuration_singular_data_source_gen.go
227 lines (215 loc) · 7.24 KB
/
instance_access_control_attribute_configuration_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
// Code generated by generators/singular-data-source/main.go; DO NOT EDIT.
package sso
import (
"context"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"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.AddDataSourceTypeFactory("awscc_sso_instance_access_control_attribute_configuration", instanceAccessControlAttributeConfigurationDataSourceType)
}
// instanceAccessControlAttributeConfigurationDataSourceType returns the Terraform awscc_sso_instance_access_control_attribute_configuration data source type.
// This Terraform data source type corresponds to the CloudFormation AWS::SSO::InstanceAccessControlAttributeConfiguration resource type.
func instanceAccessControlAttributeConfigurationDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) {
attributes := map[string]tfsdk.Attribute{
"access_control_attributes": {
// Property: AccessControlAttributes
// CloudFormation resource type schema:
// {
// "insertionOrder": false,
// "items": {
// "additionalProperties": false,
// "properties": {
// "Key": {
// "maxLength": 128,
// "minLength": 1,
// "pattern": "[\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@]+",
// "type": "string"
// },
// "Value": {
// "additionalProperties": false,
// "properties": {
// "Source": {
// "insertionOrder": true,
// "items": {
// "maxLength": 256,
// "minLength": 0,
// "pattern": "[\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@\\[\\]\\{\\}\\$\\\\\"]*",
// "type": "string"
// },
// "maxItems": 1,
// "type": "array"
// }
// },
// "required": [
// "Source"
// ],
// "type": "object"
// }
// },
// "required": [
// "Key",
// "Value"
// ],
// "type": "object"
// },
// "maxItems": 50,
// "type": "array"
// }
Attributes: tfsdk.ListNestedAttributes(
map[string]tfsdk.Attribute{
"key": {
// Property: Key
Type: types.StringType,
Computed: true,
},
"value": {
// Property: Value
Attributes: tfsdk.SingleNestedAttributes(
map[string]tfsdk.Attribute{
"source": {
// Property: Source
Type: types.ListType{ElemType: types.StringType},
Computed: true,
},
},
),
Computed: true,
},
},
tfsdk.ListNestedAttributesOptions{},
),
Computed: true,
},
"instance_access_control_attribute_configuration": {
// Property: InstanceAccessControlAttributeConfiguration
// CloudFormation resource type schema:
// {
// "additionalProperties": false,
// "description": "The InstanceAccessControlAttributeConfiguration property has been deprecated but is still supported for backwards compatibility purposes. We recomend that you use AccessControlAttributes property instead.",
// "properties": {
// "AccessControlAttributes": {
// "insertionOrder": false,
// "items": {
// "additionalProperties": false,
// "properties": {
// "Key": {
// "maxLength": 128,
// "minLength": 1,
// "pattern": "[\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@]+",
// "type": "string"
// },
// "Value": {
// "additionalProperties": false,
// "properties": {
// "Source": {
// "insertionOrder": true,
// "items": {
// "maxLength": 256,
// "minLength": 0,
// "pattern": "[\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@\\[\\]\\{\\}\\$\\\\\"]*",
// "type": "string"
// },
// "maxItems": 1,
// "type": "array"
// }
// },
// "required": [
// "Source"
// ],
// "type": "object"
// }
// },
// "required": [
// "Key",
// "Value"
// ],
// "type": "object"
// },
// "maxItems": 50,
// "type": "array"
// }
// },
// "required": [
// "AccessControlAttributes"
// ],
// "type": "object"
// }
Description: "The InstanceAccessControlAttributeConfiguration property has been deprecated but is still supported for backwards compatibility purposes. We recomend that you use AccessControlAttributes property instead.",
Attributes: tfsdk.SingleNestedAttributes(
map[string]tfsdk.Attribute{
"access_control_attributes": {
// Property: AccessControlAttributes
Attributes: tfsdk.ListNestedAttributes(
map[string]tfsdk.Attribute{
"key": {
// Property: Key
Type: types.StringType,
Computed: true,
},
"value": {
// Property: Value
Attributes: tfsdk.SingleNestedAttributes(
map[string]tfsdk.Attribute{
"source": {
// Property: Source
Type: types.ListType{ElemType: types.StringType},
Computed: true,
},
},
),
Computed: true,
},
},
tfsdk.ListNestedAttributesOptions{},
),
Computed: true,
},
},
),
Computed: true,
},
"instance_arn": {
// Property: InstanceArn
// CloudFormation resource type schema:
// {
// "description": "The ARN of the AWS SSO instance under which the operation will be executed.",
// "maxLength": 1224,
// "minLength": 10,
// "pattern": "arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b):sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}",
// "type": "string"
// }
Description: "The ARN of the AWS SSO instance under which the operation will be executed.",
Type: types.StringType,
Computed: true,
},
}
attributes["id"] = tfsdk.Attribute{
Description: "Uniquely identifies the resource.",
Type: types.StringType,
Required: true,
}
schema := tfsdk.Schema{
Description: "Data Source schema for AWS::SSO::InstanceAccessControlAttributeConfiguration",
Version: 1,
Attributes: attributes,
}
var opts DataSourceTypeOptions
opts = opts.WithCloudFormationTypeName("AWS::SSO::InstanceAccessControlAttributeConfiguration").WithTerraformTypeName("awscc_sso_instance_access_control_attribute_configuration")
opts = opts.WithTerraformSchema(schema)
opts = opts.WithAttributeNameMap(map[string]string{
"access_control_attributes": "AccessControlAttributes",
"instance_access_control_attribute_configuration": "InstanceAccessControlAttributeConfiguration",
"instance_arn": "InstanceArn",
"key": "Key",
"source": "Source",
"value": "Value",
})
singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...)
if err != nil {
return nil, err
}
return singularDataSourceType, nil
}