generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 108
/
permission_set_singular_data_source_gen.go
221 lines (209 loc) · 6.64 KB
/
permission_set_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
// 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_permission_set", permissionSetDataSourceType)
}
// permissionSetDataSourceType returns the Terraform awscc_sso_permission_set data source type.
// This Terraform data source type corresponds to the CloudFormation AWS::SSO::PermissionSet resource type.
func permissionSetDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) {
attributes := map[string]tfsdk.Attribute{
"description": {
// Property: Description
// CloudFormation resource type schema:
// {
// "description": "The permission set description.",
// "maxLength": 700,
// "minLength": 1,
// "pattern": "[\\p{L}\\p{M}\\p{Z}\\p{S}\\p{N}\\p{P}]*",
// "type": "string"
// }
Description: "The permission set description.",
Type: types.StringType,
Computed: true,
},
"inline_policy": {
// Property: InlinePolicy
// CloudFormation resource type schema:
// {
// "description": "The inline policy to put in permission set.",
// "type": "string"
// }
Description: "The inline policy to put in permission set.",
Type: types.StringType,
Computed: true,
},
"instance_arn": {
// Property: InstanceArn
// CloudFormation resource type schema:
// {
// "description": "The sso instance arn that the permission set is owned.",
// "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 sso instance arn that the permission set is owned.",
Type: types.StringType,
Computed: true,
},
"managed_policies": {
// Property: ManagedPolicies
// CloudFormation resource type schema:
// {
// "insertionOrder": false,
// "items": {
// "description": "The managed policy to attach.",
// "maxLength": 2048,
// "minLength": 20,
// "type": "string"
// },
// "maxItems": 20,
// "type": "array"
// }
Type: types.ListType{ElemType: types.StringType},
Computed: true,
},
"name": {
// Property: Name
// CloudFormation resource type schema:
// {
// "description": "The name you want to assign to this permission set.",
// "maxLength": 32,
// "minLength": 1,
// "pattern": "[\\w+=,.@-]+",
// "type": "string"
// }
Description: "The name you want to assign to this permission set.",
Type: types.StringType,
Computed: true,
},
"permission_set_arn": {
// Property: PermissionSetArn
// CloudFormation resource type schema:
// {
// "description": "The permission set that the policy will be attached to",
// "maxLength": 1224,
// "minLength": 10,
// "pattern": "arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b):sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}",
// "type": "string"
// }
Description: "The permission set that the policy will be attached to",
Type: types.StringType,
Computed: true,
},
"relay_state_type": {
// Property: RelayStateType
// CloudFormation resource type schema:
// {
// "description": "The relay state URL that redirect links to any service in the AWS Management Console.",
// "maxLength": 240,
// "minLength": 1,
// "pattern": "[a-zA-Z0-9\u0026amp;$@#\\/%?=~\\-_'\u0026quot;|!:,.;*+\\[\\]\\ \\(\\)\\{\\}]+",
// "type": "string"
// }
Description: "The relay state URL that redirect links to any service in the AWS Management Console.",
Type: types.StringType,
Computed: true,
},
"session_duration": {
// Property: SessionDuration
// CloudFormation resource type schema:
// {
// "description": "The length of time that a user can be signed in to an AWS account.",
// "maxLength": 100,
// "minLength": 1,
// "pattern": "",
// "type": "string"
// }
Description: "The length of time that a user can be signed in to an AWS account.",
Type: types.StringType,
Computed: true,
},
"tags": {
// Property: Tags
// CloudFormation resource type schema:
// {
// "insertionOrder": false,
// "items": {
// "additionalProperties": false,
// "description": "The metadata that you apply to the permission set to help you categorize and organize them.",
// "properties": {
// "Key": {
// "maxLength": 128,
// "minLength": 1,
// "pattern": "[\\w+=,.@-]+",
// "type": "string"
// },
// "Value": {
// "maxLength": 256,
// "minLength": 0,
// "pattern": "[\\w+=,.@-]+",
// "type": "string"
// }
// },
// "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
Type: types.StringType,
Computed: true,
},
},
tfsdk.ListNestedAttributesOptions{},
),
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::PermissionSet",
Version: 1,
Attributes: attributes,
}
var opts DataSourceTypeOptions
opts = opts.WithCloudFormationTypeName("AWS::SSO::PermissionSet").WithTerraformTypeName("awscc_sso_permission_set")
opts = opts.WithTerraformSchema(schema)
opts = opts.WithAttributeNameMap(map[string]string{
"description": "Description",
"inline_policy": "InlinePolicy",
"instance_arn": "InstanceArn",
"key": "Key",
"managed_policies": "ManagedPolicies",
"name": "Name",
"permission_set_arn": "PermissionSetArn",
"relay_state_type": "RelayStateType",
"session_duration": "SessionDuration",
"tags": "Tags",
"value": "Value",
})
singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...)
if err != nil {
return nil, err
}
return singularDataSourceType, nil
}