/
secretBackendRole.go
541 lines (480 loc) · 25.2 KB
/
secretBackendRole.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
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
// *** 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! ***
package ssh
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a resource to manage roles in an SSH secret backend
// [SSH secret backend within Vault](https://www.vaultproject.io/docs/secrets/ssh/index.html).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-vault/sdk/v4/go/vault"
// "github.com/pulumi/pulumi-vault/sdk/v4/go/vault/ssh"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := vault.NewMount(ctx, "example", &vault.MountArgs{
// Type: pulumi.String("ssh"),
// })
// if err != nil {
// return err
// }
// _, err = ssh.NewSecretBackendRole(ctx, "foo", &ssh.SecretBackendRoleArgs{
// Backend: example.Path,
// KeyType: pulumi.String("ca"),
// AllowUserCertificates: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = ssh.NewSecretBackendRole(ctx, "bar", &ssh.SecretBackendRoleArgs{
// Backend: example.Path,
// KeyType: pulumi.String("otp"),
// DefaultUser: pulumi.String("default"),
// AllowedUsers: pulumi.String("default,baz"),
// CidrList: pulumi.String("0.0.0.0/0"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// SSH secret backend roles can be imported using the `path`, e.g.
//
// ```sh
// $ pulumi import vault:ssh/secretBackendRole:SecretBackendRole foo ssh/roles/my-role
// ```
type SecretBackendRole struct {
pulumi.CustomResourceState
// When supplied, this value specifies a signing algorithm for the key. Possible values: ssh-rsa, rsa-sha2-256, rsa-sha2-512.
AlgorithmSigner pulumi.StringOutput `pulumi:"algorithmSigner"`
// Specifies if host certificates that are requested are allowed to use the base domains listed in `allowedDomains`.
AllowBareDomains pulumi.BoolPtrOutput `pulumi:"allowBareDomains"`
// Specifies if certificates are allowed to be signed for use as a 'host'.
AllowHostCertificates pulumi.BoolPtrOutput `pulumi:"allowHostCertificates"`
// Specifies if host certificates that are requested are allowed to be subdomains of those listed in `allowedDomains`.
AllowSubdomains pulumi.BoolPtrOutput `pulumi:"allowSubdomains"`
// Specifies if certificates are allowed to be signed for use as a 'user'.
AllowUserCertificates pulumi.BoolPtrOutput `pulumi:"allowUserCertificates"`
// Specifies if users can override the key ID for a signed certificate with the `keyId` field.
AllowUserKeyIds pulumi.BoolPtrOutput `pulumi:"allowUserKeyIds"`
// Specifies a comma-separated list of critical options that certificates can have when signed.
AllowedCriticalOptions pulumi.StringPtrOutput `pulumi:"allowedCriticalOptions"`
// The list of domains for which a client can request a host certificate.
AllowedDomains pulumi.StringPtrOutput `pulumi:"allowedDomains"`
// Specifies a comma-separated list of extensions that certificates can have when signed.
AllowedExtensions pulumi.StringPtrOutput `pulumi:"allowedExtensions"`
// Specifies a map of ssh key types and their expected sizes which are allowed to be signed by the CA type.
AllowedUserKeyLengths pulumi.MapOutput `pulumi:"allowedUserKeyLengths"`
// Specifies a comma-separated list of usernames that are to be allowed, only if certain usernames are to be allowed.
AllowedUsers pulumi.StringPtrOutput `pulumi:"allowedUsers"`
// Specifies if `allowedUsers` can be declared using identity template policies. Non-templated users are also permitted.
AllowedUsersTemplate pulumi.BoolPtrOutput `pulumi:"allowedUsersTemplate"`
// The path where the SSH secret backend is mounted.
Backend pulumi.StringOutput `pulumi:"backend"`
// The comma-separated string of CIDR blocks for which this role is applicable.
CidrList pulumi.StringPtrOutput `pulumi:"cidrList"`
// Specifies a map of critical options that certificates have when signed.
DefaultCriticalOptions pulumi.MapOutput `pulumi:"defaultCriticalOptions"`
// Specifies a map of extensions that certificates have when signed.
DefaultExtensions pulumi.MapOutput `pulumi:"defaultExtensions"`
// Specifies the default username for which a credential will be generated.
DefaultUser pulumi.StringPtrOutput `pulumi:"defaultUser"`
// Specifies a custom format for the key id of a signed certificate.
KeyIdFormat pulumi.StringPtrOutput `pulumi:"keyIdFormat"`
// Specifies the type of credentials generated by this role. This can be either `otp`, `dynamic` or `ca`.
KeyType pulumi.StringOutput `pulumi:"keyType"`
// Specifies the maximum Time To Live value.
MaxTtl pulumi.StringOutput `pulumi:"maxTtl"`
// Specifies the name of the role to create.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the Time To Live value.
Ttl pulumi.StringOutput `pulumi:"ttl"`
}
// NewSecretBackendRole registers a new resource with the given unique name, arguments, and options.
func NewSecretBackendRole(ctx *pulumi.Context,
name string, args *SecretBackendRoleArgs, opts ...pulumi.ResourceOption) (*SecretBackendRole, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Backend == nil {
return nil, errors.New("invalid value for required argument 'Backend'")
}
if args.KeyType == nil {
return nil, errors.New("invalid value for required argument 'KeyType'")
}
var resource SecretBackendRole
err := ctx.RegisterResource("vault:ssh/secretBackendRole:SecretBackendRole", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSecretBackendRole gets an existing SecretBackendRole 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 GetSecretBackendRole(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SecretBackendRoleState, opts ...pulumi.ResourceOption) (*SecretBackendRole, error) {
var resource SecretBackendRole
err := ctx.ReadResource("vault:ssh/secretBackendRole:SecretBackendRole", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SecretBackendRole resources.
type secretBackendRoleState struct {
// When supplied, this value specifies a signing algorithm for the key. Possible values: ssh-rsa, rsa-sha2-256, rsa-sha2-512.
AlgorithmSigner *string `pulumi:"algorithmSigner"`
// Specifies if host certificates that are requested are allowed to use the base domains listed in `allowedDomains`.
AllowBareDomains *bool `pulumi:"allowBareDomains"`
// Specifies if certificates are allowed to be signed for use as a 'host'.
AllowHostCertificates *bool `pulumi:"allowHostCertificates"`
// Specifies if host certificates that are requested are allowed to be subdomains of those listed in `allowedDomains`.
AllowSubdomains *bool `pulumi:"allowSubdomains"`
// Specifies if certificates are allowed to be signed for use as a 'user'.
AllowUserCertificates *bool `pulumi:"allowUserCertificates"`
// Specifies if users can override the key ID for a signed certificate with the `keyId` field.
AllowUserKeyIds *bool `pulumi:"allowUserKeyIds"`
// Specifies a comma-separated list of critical options that certificates can have when signed.
AllowedCriticalOptions *string `pulumi:"allowedCriticalOptions"`
// The list of domains for which a client can request a host certificate.
AllowedDomains *string `pulumi:"allowedDomains"`
// Specifies a comma-separated list of extensions that certificates can have when signed.
AllowedExtensions *string `pulumi:"allowedExtensions"`
// Specifies a map of ssh key types and their expected sizes which are allowed to be signed by the CA type.
AllowedUserKeyLengths map[string]interface{} `pulumi:"allowedUserKeyLengths"`
// Specifies a comma-separated list of usernames that are to be allowed, only if certain usernames are to be allowed.
AllowedUsers *string `pulumi:"allowedUsers"`
// Specifies if `allowedUsers` can be declared using identity template policies. Non-templated users are also permitted.
AllowedUsersTemplate *bool `pulumi:"allowedUsersTemplate"`
// The path where the SSH secret backend is mounted.
Backend *string `pulumi:"backend"`
// The comma-separated string of CIDR blocks for which this role is applicable.
CidrList *string `pulumi:"cidrList"`
// Specifies a map of critical options that certificates have when signed.
DefaultCriticalOptions map[string]interface{} `pulumi:"defaultCriticalOptions"`
// Specifies a map of extensions that certificates have when signed.
DefaultExtensions map[string]interface{} `pulumi:"defaultExtensions"`
// Specifies the default username for which a credential will be generated.
DefaultUser *string `pulumi:"defaultUser"`
// Specifies a custom format for the key id of a signed certificate.
KeyIdFormat *string `pulumi:"keyIdFormat"`
// Specifies the type of credentials generated by this role. This can be either `otp`, `dynamic` or `ca`.
KeyType *string `pulumi:"keyType"`
// Specifies the maximum Time To Live value.
MaxTtl *string `pulumi:"maxTtl"`
// Specifies the name of the role to create.
Name *string `pulumi:"name"`
// Specifies the Time To Live value.
Ttl *string `pulumi:"ttl"`
}
type SecretBackendRoleState struct {
// When supplied, this value specifies a signing algorithm for the key. Possible values: ssh-rsa, rsa-sha2-256, rsa-sha2-512.
AlgorithmSigner pulumi.StringPtrInput
// Specifies if host certificates that are requested are allowed to use the base domains listed in `allowedDomains`.
AllowBareDomains pulumi.BoolPtrInput
// Specifies if certificates are allowed to be signed for use as a 'host'.
AllowHostCertificates pulumi.BoolPtrInput
// Specifies if host certificates that are requested are allowed to be subdomains of those listed in `allowedDomains`.
AllowSubdomains pulumi.BoolPtrInput
// Specifies if certificates are allowed to be signed for use as a 'user'.
AllowUserCertificates pulumi.BoolPtrInput
// Specifies if users can override the key ID for a signed certificate with the `keyId` field.
AllowUserKeyIds pulumi.BoolPtrInput
// Specifies a comma-separated list of critical options that certificates can have when signed.
AllowedCriticalOptions pulumi.StringPtrInput
// The list of domains for which a client can request a host certificate.
AllowedDomains pulumi.StringPtrInput
// Specifies a comma-separated list of extensions that certificates can have when signed.
AllowedExtensions pulumi.StringPtrInput
// Specifies a map of ssh key types and their expected sizes which are allowed to be signed by the CA type.
AllowedUserKeyLengths pulumi.MapInput
// Specifies a comma-separated list of usernames that are to be allowed, only if certain usernames are to be allowed.
AllowedUsers pulumi.StringPtrInput
// Specifies if `allowedUsers` can be declared using identity template policies. Non-templated users are also permitted.
AllowedUsersTemplate pulumi.BoolPtrInput
// The path where the SSH secret backend is mounted.
Backend pulumi.StringPtrInput
// The comma-separated string of CIDR blocks for which this role is applicable.
CidrList pulumi.StringPtrInput
// Specifies a map of critical options that certificates have when signed.
DefaultCriticalOptions pulumi.MapInput
// Specifies a map of extensions that certificates have when signed.
DefaultExtensions pulumi.MapInput
// Specifies the default username for which a credential will be generated.
DefaultUser pulumi.StringPtrInput
// Specifies a custom format for the key id of a signed certificate.
KeyIdFormat pulumi.StringPtrInput
// Specifies the type of credentials generated by this role. This can be either `otp`, `dynamic` or `ca`.
KeyType pulumi.StringPtrInput
// Specifies the maximum Time To Live value.
MaxTtl pulumi.StringPtrInput
// Specifies the name of the role to create.
Name pulumi.StringPtrInput
// Specifies the Time To Live value.
Ttl pulumi.StringPtrInput
}
func (SecretBackendRoleState) ElementType() reflect.Type {
return reflect.TypeOf((*secretBackendRoleState)(nil)).Elem()
}
type secretBackendRoleArgs struct {
// When supplied, this value specifies a signing algorithm for the key. Possible values: ssh-rsa, rsa-sha2-256, rsa-sha2-512.
AlgorithmSigner *string `pulumi:"algorithmSigner"`
// Specifies if host certificates that are requested are allowed to use the base domains listed in `allowedDomains`.
AllowBareDomains *bool `pulumi:"allowBareDomains"`
// Specifies if certificates are allowed to be signed for use as a 'host'.
AllowHostCertificates *bool `pulumi:"allowHostCertificates"`
// Specifies if host certificates that are requested are allowed to be subdomains of those listed in `allowedDomains`.
AllowSubdomains *bool `pulumi:"allowSubdomains"`
// Specifies if certificates are allowed to be signed for use as a 'user'.
AllowUserCertificates *bool `pulumi:"allowUserCertificates"`
// Specifies if users can override the key ID for a signed certificate with the `keyId` field.
AllowUserKeyIds *bool `pulumi:"allowUserKeyIds"`
// Specifies a comma-separated list of critical options that certificates can have when signed.
AllowedCriticalOptions *string `pulumi:"allowedCriticalOptions"`
// The list of domains for which a client can request a host certificate.
AllowedDomains *string `pulumi:"allowedDomains"`
// Specifies a comma-separated list of extensions that certificates can have when signed.
AllowedExtensions *string `pulumi:"allowedExtensions"`
// Specifies a map of ssh key types and their expected sizes which are allowed to be signed by the CA type.
AllowedUserKeyLengths map[string]interface{} `pulumi:"allowedUserKeyLengths"`
// Specifies a comma-separated list of usernames that are to be allowed, only if certain usernames are to be allowed.
AllowedUsers *string `pulumi:"allowedUsers"`
// Specifies if `allowedUsers` can be declared using identity template policies. Non-templated users are also permitted.
AllowedUsersTemplate *bool `pulumi:"allowedUsersTemplate"`
// The path where the SSH secret backend is mounted.
Backend string `pulumi:"backend"`
// The comma-separated string of CIDR blocks for which this role is applicable.
CidrList *string `pulumi:"cidrList"`
// Specifies a map of critical options that certificates have when signed.
DefaultCriticalOptions map[string]interface{} `pulumi:"defaultCriticalOptions"`
// Specifies a map of extensions that certificates have when signed.
DefaultExtensions map[string]interface{} `pulumi:"defaultExtensions"`
// Specifies the default username for which a credential will be generated.
DefaultUser *string `pulumi:"defaultUser"`
// Specifies a custom format for the key id of a signed certificate.
KeyIdFormat *string `pulumi:"keyIdFormat"`
// Specifies the type of credentials generated by this role. This can be either `otp`, `dynamic` or `ca`.
KeyType string `pulumi:"keyType"`
// Specifies the maximum Time To Live value.
MaxTtl *string `pulumi:"maxTtl"`
// Specifies the name of the role to create.
Name *string `pulumi:"name"`
// Specifies the Time To Live value.
Ttl *string `pulumi:"ttl"`
}
// The set of arguments for constructing a SecretBackendRole resource.
type SecretBackendRoleArgs struct {
// When supplied, this value specifies a signing algorithm for the key. Possible values: ssh-rsa, rsa-sha2-256, rsa-sha2-512.
AlgorithmSigner pulumi.StringPtrInput
// Specifies if host certificates that are requested are allowed to use the base domains listed in `allowedDomains`.
AllowBareDomains pulumi.BoolPtrInput
// Specifies if certificates are allowed to be signed for use as a 'host'.
AllowHostCertificates pulumi.BoolPtrInput
// Specifies if host certificates that are requested are allowed to be subdomains of those listed in `allowedDomains`.
AllowSubdomains pulumi.BoolPtrInput
// Specifies if certificates are allowed to be signed for use as a 'user'.
AllowUserCertificates pulumi.BoolPtrInput
// Specifies if users can override the key ID for a signed certificate with the `keyId` field.
AllowUserKeyIds pulumi.BoolPtrInput
// Specifies a comma-separated list of critical options that certificates can have when signed.
AllowedCriticalOptions pulumi.StringPtrInput
// The list of domains for which a client can request a host certificate.
AllowedDomains pulumi.StringPtrInput
// Specifies a comma-separated list of extensions that certificates can have when signed.
AllowedExtensions pulumi.StringPtrInput
// Specifies a map of ssh key types and their expected sizes which are allowed to be signed by the CA type.
AllowedUserKeyLengths pulumi.MapInput
// Specifies a comma-separated list of usernames that are to be allowed, only if certain usernames are to be allowed.
AllowedUsers pulumi.StringPtrInput
// Specifies if `allowedUsers` can be declared using identity template policies. Non-templated users are also permitted.
AllowedUsersTemplate pulumi.BoolPtrInput
// The path where the SSH secret backend is mounted.
Backend pulumi.StringInput
// The comma-separated string of CIDR blocks for which this role is applicable.
CidrList pulumi.StringPtrInput
// Specifies a map of critical options that certificates have when signed.
DefaultCriticalOptions pulumi.MapInput
// Specifies a map of extensions that certificates have when signed.
DefaultExtensions pulumi.MapInput
// Specifies the default username for which a credential will be generated.
DefaultUser pulumi.StringPtrInput
// Specifies a custom format for the key id of a signed certificate.
KeyIdFormat pulumi.StringPtrInput
// Specifies the type of credentials generated by this role. This can be either `otp`, `dynamic` or `ca`.
KeyType pulumi.StringInput
// Specifies the maximum Time To Live value.
MaxTtl pulumi.StringPtrInput
// Specifies the name of the role to create.
Name pulumi.StringPtrInput
// Specifies the Time To Live value.
Ttl pulumi.StringPtrInput
}
func (SecretBackendRoleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*secretBackendRoleArgs)(nil)).Elem()
}
type SecretBackendRoleInput interface {
pulumi.Input
ToSecretBackendRoleOutput() SecretBackendRoleOutput
ToSecretBackendRoleOutputWithContext(ctx context.Context) SecretBackendRoleOutput
}
func (*SecretBackendRole) ElementType() reflect.Type {
return reflect.TypeOf((*SecretBackendRole)(nil))
}
func (i *SecretBackendRole) ToSecretBackendRoleOutput() SecretBackendRoleOutput {
return i.ToSecretBackendRoleOutputWithContext(context.Background())
}
func (i *SecretBackendRole) ToSecretBackendRoleOutputWithContext(ctx context.Context) SecretBackendRoleOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecretBackendRoleOutput)
}
func (i *SecretBackendRole) ToSecretBackendRolePtrOutput() SecretBackendRolePtrOutput {
return i.ToSecretBackendRolePtrOutputWithContext(context.Background())
}
func (i *SecretBackendRole) ToSecretBackendRolePtrOutputWithContext(ctx context.Context) SecretBackendRolePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecretBackendRolePtrOutput)
}
type SecretBackendRolePtrInput interface {
pulumi.Input
ToSecretBackendRolePtrOutput() SecretBackendRolePtrOutput
ToSecretBackendRolePtrOutputWithContext(ctx context.Context) SecretBackendRolePtrOutput
}
type secretBackendRolePtrType SecretBackendRoleArgs
func (*secretBackendRolePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**SecretBackendRole)(nil))
}
func (i *secretBackendRolePtrType) ToSecretBackendRolePtrOutput() SecretBackendRolePtrOutput {
return i.ToSecretBackendRolePtrOutputWithContext(context.Background())
}
func (i *secretBackendRolePtrType) ToSecretBackendRolePtrOutputWithContext(ctx context.Context) SecretBackendRolePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecretBackendRolePtrOutput)
}
// SecretBackendRoleArrayInput is an input type that accepts SecretBackendRoleArray and SecretBackendRoleArrayOutput values.
// You can construct a concrete instance of `SecretBackendRoleArrayInput` via:
//
// SecretBackendRoleArray{ SecretBackendRoleArgs{...} }
type SecretBackendRoleArrayInput interface {
pulumi.Input
ToSecretBackendRoleArrayOutput() SecretBackendRoleArrayOutput
ToSecretBackendRoleArrayOutputWithContext(context.Context) SecretBackendRoleArrayOutput
}
type SecretBackendRoleArray []SecretBackendRoleInput
func (SecretBackendRoleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SecretBackendRole)(nil)).Elem()
}
func (i SecretBackendRoleArray) ToSecretBackendRoleArrayOutput() SecretBackendRoleArrayOutput {
return i.ToSecretBackendRoleArrayOutputWithContext(context.Background())
}
func (i SecretBackendRoleArray) ToSecretBackendRoleArrayOutputWithContext(ctx context.Context) SecretBackendRoleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecretBackendRoleArrayOutput)
}
// SecretBackendRoleMapInput is an input type that accepts SecretBackendRoleMap and SecretBackendRoleMapOutput values.
// You can construct a concrete instance of `SecretBackendRoleMapInput` via:
//
// SecretBackendRoleMap{ "key": SecretBackendRoleArgs{...} }
type SecretBackendRoleMapInput interface {
pulumi.Input
ToSecretBackendRoleMapOutput() SecretBackendRoleMapOutput
ToSecretBackendRoleMapOutputWithContext(context.Context) SecretBackendRoleMapOutput
}
type SecretBackendRoleMap map[string]SecretBackendRoleInput
func (SecretBackendRoleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SecretBackendRole)(nil)).Elem()
}
func (i SecretBackendRoleMap) ToSecretBackendRoleMapOutput() SecretBackendRoleMapOutput {
return i.ToSecretBackendRoleMapOutputWithContext(context.Background())
}
func (i SecretBackendRoleMap) ToSecretBackendRoleMapOutputWithContext(ctx context.Context) SecretBackendRoleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecretBackendRoleMapOutput)
}
type SecretBackendRoleOutput struct{ *pulumi.OutputState }
func (SecretBackendRoleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*SecretBackendRole)(nil))
}
func (o SecretBackendRoleOutput) ToSecretBackendRoleOutput() SecretBackendRoleOutput {
return o
}
func (o SecretBackendRoleOutput) ToSecretBackendRoleOutputWithContext(ctx context.Context) SecretBackendRoleOutput {
return o
}
func (o SecretBackendRoleOutput) ToSecretBackendRolePtrOutput() SecretBackendRolePtrOutput {
return o.ToSecretBackendRolePtrOutputWithContext(context.Background())
}
func (o SecretBackendRoleOutput) ToSecretBackendRolePtrOutputWithContext(ctx context.Context) SecretBackendRolePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v SecretBackendRole) *SecretBackendRole {
return &v
}).(SecretBackendRolePtrOutput)
}
type SecretBackendRolePtrOutput struct{ *pulumi.OutputState }
func (SecretBackendRolePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SecretBackendRole)(nil))
}
func (o SecretBackendRolePtrOutput) ToSecretBackendRolePtrOutput() SecretBackendRolePtrOutput {
return o
}
func (o SecretBackendRolePtrOutput) ToSecretBackendRolePtrOutputWithContext(ctx context.Context) SecretBackendRolePtrOutput {
return o
}
func (o SecretBackendRolePtrOutput) Elem() SecretBackendRoleOutput {
return o.ApplyT(func(v *SecretBackendRole) SecretBackendRole {
if v != nil {
return *v
}
var ret SecretBackendRole
return ret
}).(SecretBackendRoleOutput)
}
type SecretBackendRoleArrayOutput struct{ *pulumi.OutputState }
func (SecretBackendRoleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]SecretBackendRole)(nil))
}
func (o SecretBackendRoleArrayOutput) ToSecretBackendRoleArrayOutput() SecretBackendRoleArrayOutput {
return o
}
func (o SecretBackendRoleArrayOutput) ToSecretBackendRoleArrayOutputWithContext(ctx context.Context) SecretBackendRoleArrayOutput {
return o
}
func (o SecretBackendRoleArrayOutput) Index(i pulumi.IntInput) SecretBackendRoleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) SecretBackendRole {
return vs[0].([]SecretBackendRole)[vs[1].(int)]
}).(SecretBackendRoleOutput)
}
type SecretBackendRoleMapOutput struct{ *pulumi.OutputState }
func (SecretBackendRoleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]SecretBackendRole)(nil))
}
func (o SecretBackendRoleMapOutput) ToSecretBackendRoleMapOutput() SecretBackendRoleMapOutput {
return o
}
func (o SecretBackendRoleMapOutput) ToSecretBackendRoleMapOutputWithContext(ctx context.Context) SecretBackendRoleMapOutput {
return o
}
func (o SecretBackendRoleMapOutput) MapIndex(k pulumi.StringInput) SecretBackendRoleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) SecretBackendRole {
return vs[0].(map[string]SecretBackendRole)[vs[1].(string)]
}).(SecretBackendRoleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SecretBackendRoleInput)(nil)).Elem(), &SecretBackendRole{})
pulumi.RegisterInputType(reflect.TypeOf((*SecretBackendRolePtrInput)(nil)).Elem(), &SecretBackendRole{})
pulumi.RegisterInputType(reflect.TypeOf((*SecretBackendRoleArrayInput)(nil)).Elem(), SecretBackendRoleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SecretBackendRoleMapInput)(nil)).Elem(), SecretBackendRoleMap{})
pulumi.RegisterOutputType(SecretBackendRoleOutput{})
pulumi.RegisterOutputType(SecretBackendRolePtrOutput{})
pulumi.RegisterOutputType(SecretBackendRoleArrayOutput{})
pulumi.RegisterOutputType(SecretBackendRoleMapOutput{})
}