generated from pulumi/pulumi-tf-provider-boilerplate
/
authConfigAdfs.go
237 lines (223 loc) · 9.86 KB
/
authConfigAdfs.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
// nolint: lll
package rancher2
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Provides a Rancher v2 Auth Config ADFS resource. This can be used to configure and enable Auth Config ADFS for Rancher v2 RKE clusters and retrieve their information.
//
// In addition to the built-in local auth, only one external auth config provider can be enabled at a time.
//
// > This content is derived from https://github.com/terraform-providers/terraform-provider-rancher2/blob/master/website/docs/r/authConfigADFS.html.markdown.
type AuthConfigAdfs struct {
pulumi.CustomResourceState
// Access mode for auth. `required`, `restricted`, `unrestricted` are supported. Default `unrestricted` (string)
AccessMode pulumi.StringPtrOutput `pulumi:"accessMode"`
// Allowed principal ids for auth. Required if `accessMode` is `required` or `restricted`. Ex: `adfs_user://<USER_ID>` `adfs_group://<GROUP_ID>` (list)
AllowedPrincipalIds pulumi.StringArrayOutput `pulumi:"allowedPrincipalIds"`
// Annotations of the resource (map)
Annotations pulumi.MapOutput `pulumi:"annotations"`
// ADFS display name field (string)
DisplayNameField pulumi.StringOutput `pulumi:"displayNameField"`
// Enable auth config provider. Default `true` (bool)
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// ADFS group field (string)
GroupsField pulumi.StringOutput `pulumi:"groupsField"`
// ADFS IDP metadata content (string)
IdpMetadataContent pulumi.StringOutput `pulumi:"idpMetadataContent"`
// Labels of the resource (map)
Labels pulumi.MapOutput `pulumi:"labels"`
// (Computed) The name of the resource (string)
Name pulumi.StringOutput `pulumi:"name"`
// Rancher url. Schema needs to be specified, `https://<RANCHER_API_HOST>` (string)
RancherApiHost pulumi.StringOutput `pulumi:"rancherApiHost"`
// ADFS SP cert (string)
SpCert pulumi.StringOutput `pulumi:"spCert"`
// ADFS SP key (string)
SpKey pulumi.StringOutput `pulumi:"spKey"`
// (Computed) The type of the resource (string)
Type pulumi.StringOutput `pulumi:"type"`
// ADFS UID field (string)
UidField pulumi.StringOutput `pulumi:"uidField"`
// ADFS user name field (string)
UserNameField pulumi.StringOutput `pulumi:"userNameField"`
}
// NewAuthConfigAdfs registers a new resource with the given unique name, arguments, and options.
func NewAuthConfigAdfs(ctx *pulumi.Context,
name string, args *AuthConfigAdfsArgs, opts ...pulumi.ResourceOption) (*AuthConfigAdfs, error) {
if args == nil || args.DisplayNameField == nil {
return nil, errors.New("missing required argument 'DisplayNameField'")
}
if args == nil || args.GroupsField == nil {
return nil, errors.New("missing required argument 'GroupsField'")
}
if args == nil || args.IdpMetadataContent == nil {
return nil, errors.New("missing required argument 'IdpMetadataContent'")
}
if args == nil || args.RancherApiHost == nil {
return nil, errors.New("missing required argument 'RancherApiHost'")
}
if args == nil || args.SpCert == nil {
return nil, errors.New("missing required argument 'SpCert'")
}
if args == nil || args.SpKey == nil {
return nil, errors.New("missing required argument 'SpKey'")
}
if args == nil || args.UidField == nil {
return nil, errors.New("missing required argument 'UidField'")
}
if args == nil || args.UserNameField == nil {
return nil, errors.New("missing required argument 'UserNameField'")
}
if args == nil {
args = &AuthConfigAdfsArgs{}
}
var resource AuthConfigAdfs
err := ctx.RegisterResource("rancher2:index/authConfigAdfs:AuthConfigAdfs", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAuthConfigAdfs gets an existing AuthConfigAdfs resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAuthConfigAdfs(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AuthConfigAdfsState, opts ...pulumi.ResourceOption) (*AuthConfigAdfs, error) {
var resource AuthConfigAdfs
err := ctx.ReadResource("rancher2:index/authConfigAdfs:AuthConfigAdfs", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AuthConfigAdfs resources.
type authConfigAdfsState struct {
// Access mode for auth. `required`, `restricted`, `unrestricted` are supported. Default `unrestricted` (string)
AccessMode *string `pulumi:"accessMode"`
// Allowed principal ids for auth. Required if `accessMode` is `required` or `restricted`. Ex: `adfs_user://<USER_ID>` `adfs_group://<GROUP_ID>` (list)
AllowedPrincipalIds []string `pulumi:"allowedPrincipalIds"`
// Annotations of the resource (map)
Annotations map[string]interface{} `pulumi:"annotations"`
// ADFS display name field (string)
DisplayNameField *string `pulumi:"displayNameField"`
// Enable auth config provider. Default `true` (bool)
Enabled *bool `pulumi:"enabled"`
// ADFS group field (string)
GroupsField *string `pulumi:"groupsField"`
// ADFS IDP metadata content (string)
IdpMetadataContent *string `pulumi:"idpMetadataContent"`
// Labels of the resource (map)
Labels map[string]interface{} `pulumi:"labels"`
// (Computed) The name of the resource (string)
Name *string `pulumi:"name"`
// Rancher url. Schema needs to be specified, `https://<RANCHER_API_HOST>` (string)
RancherApiHost *string `pulumi:"rancherApiHost"`
// ADFS SP cert (string)
SpCert *string `pulumi:"spCert"`
// ADFS SP key (string)
SpKey *string `pulumi:"spKey"`
// (Computed) The type of the resource (string)
Type *string `pulumi:"type"`
// ADFS UID field (string)
UidField *string `pulumi:"uidField"`
// ADFS user name field (string)
UserNameField *string `pulumi:"userNameField"`
}
type AuthConfigAdfsState struct {
// Access mode for auth. `required`, `restricted`, `unrestricted` are supported. Default `unrestricted` (string)
AccessMode pulumi.StringPtrInput
// Allowed principal ids for auth. Required if `accessMode` is `required` or `restricted`. Ex: `adfs_user://<USER_ID>` `adfs_group://<GROUP_ID>` (list)
AllowedPrincipalIds pulumi.StringArrayInput
// Annotations of the resource (map)
Annotations pulumi.MapInput
// ADFS display name field (string)
DisplayNameField pulumi.StringPtrInput
// Enable auth config provider. Default `true` (bool)
Enabled pulumi.BoolPtrInput
// ADFS group field (string)
GroupsField pulumi.StringPtrInput
// ADFS IDP metadata content (string)
IdpMetadataContent pulumi.StringPtrInput
// Labels of the resource (map)
Labels pulumi.MapInput
// (Computed) The name of the resource (string)
Name pulumi.StringPtrInput
// Rancher url. Schema needs to be specified, `https://<RANCHER_API_HOST>` (string)
RancherApiHost pulumi.StringPtrInput
// ADFS SP cert (string)
SpCert pulumi.StringPtrInput
// ADFS SP key (string)
SpKey pulumi.StringPtrInput
// (Computed) The type of the resource (string)
Type pulumi.StringPtrInput
// ADFS UID field (string)
UidField pulumi.StringPtrInput
// ADFS user name field (string)
UserNameField pulumi.StringPtrInput
}
func (AuthConfigAdfsState) ElementType() reflect.Type {
return reflect.TypeOf((*authConfigAdfsState)(nil)).Elem()
}
type authConfigAdfsArgs struct {
// Access mode for auth. `required`, `restricted`, `unrestricted` are supported. Default `unrestricted` (string)
AccessMode *string `pulumi:"accessMode"`
// Allowed principal ids for auth. Required if `accessMode` is `required` or `restricted`. Ex: `adfs_user://<USER_ID>` `adfs_group://<GROUP_ID>` (list)
AllowedPrincipalIds []string `pulumi:"allowedPrincipalIds"`
// Annotations of the resource (map)
Annotations map[string]interface{} `pulumi:"annotations"`
// ADFS display name field (string)
DisplayNameField string `pulumi:"displayNameField"`
// Enable auth config provider. Default `true` (bool)
Enabled *bool `pulumi:"enabled"`
// ADFS group field (string)
GroupsField string `pulumi:"groupsField"`
// ADFS IDP metadata content (string)
IdpMetadataContent string `pulumi:"idpMetadataContent"`
// Labels of the resource (map)
Labels map[string]interface{} `pulumi:"labels"`
// Rancher url. Schema needs to be specified, `https://<RANCHER_API_HOST>` (string)
RancherApiHost string `pulumi:"rancherApiHost"`
// ADFS SP cert (string)
SpCert string `pulumi:"spCert"`
// ADFS SP key (string)
SpKey string `pulumi:"spKey"`
// ADFS UID field (string)
UidField string `pulumi:"uidField"`
// ADFS user name field (string)
UserNameField string `pulumi:"userNameField"`
}
// The set of arguments for constructing a AuthConfigAdfs resource.
type AuthConfigAdfsArgs struct {
// Access mode for auth. `required`, `restricted`, `unrestricted` are supported. Default `unrestricted` (string)
AccessMode pulumi.StringPtrInput
// Allowed principal ids for auth. Required if `accessMode` is `required` or `restricted`. Ex: `adfs_user://<USER_ID>` `adfs_group://<GROUP_ID>` (list)
AllowedPrincipalIds pulumi.StringArrayInput
// Annotations of the resource (map)
Annotations pulumi.MapInput
// ADFS display name field (string)
DisplayNameField pulumi.StringInput
// Enable auth config provider. Default `true` (bool)
Enabled pulumi.BoolPtrInput
// ADFS group field (string)
GroupsField pulumi.StringInput
// ADFS IDP metadata content (string)
IdpMetadataContent pulumi.StringInput
// Labels of the resource (map)
Labels pulumi.MapInput
// Rancher url. Schema needs to be specified, `https://<RANCHER_API_HOST>` (string)
RancherApiHost pulumi.StringInput
// ADFS SP cert (string)
SpCert pulumi.StringInput
// ADFS SP key (string)
SpKey pulumi.StringInput
// ADFS UID field (string)
UidField pulumi.StringInput
// ADFS user name field (string)
UserNameField pulumi.StringInput
}
func (AuthConfigAdfsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*authConfigAdfsArgs)(nil)).Elem()
}