/
authBackendRole.go
717 lines (656 loc) · 32.1 KB
/
authBackendRole.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
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
// *** 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 kubernetes
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Kubernetes auth backend role in a Vault server. See the [Vault
// documentation](https://www.vaultproject.io/docs/auth/kubernetes.html) for more
// information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-vault/sdk/v4/go/vault"
// "github.com/pulumi/pulumi-vault/sdk/v4/go/vault/kubernetes"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// kubernetes, err := vault.NewAuthBackend(ctx, "kubernetes", &vault.AuthBackendArgs{
// Type: pulumi.String("kubernetes"),
// })
// if err != nil {
// return err
// }
// _, err = kubernetes.NewAuthBackendRole(ctx, "example", &kubernetes.AuthBackendRoleArgs{
// Backend: kubernetes.Path,
// RoleName: pulumi.String("example-role"),
// BoundServiceAccountNames: pulumi.StringArray{
// pulumi.String("example"),
// },
// BoundServiceAccountNamespaces: pulumi.StringArray{
// pulumi.String("example"),
// },
// TokenTtl: pulumi.Int(3600),
// TokenPolicies: pulumi.StringArray{
// pulumi.String("default"),
// pulumi.String("dev"),
// pulumi.String("prod"),
// },
// Audience: pulumi.String("vault"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// Kubernetes auth backend role can be imported using the `path`, e.g.
//
// ```sh
// $ pulumi import vault:kubernetes/authBackendRole:AuthBackendRole foo auth/kubernetes/role/foo
// ```
type AuthBackendRole struct {
pulumi.CustomResourceState
// Audience claim to verify in the JWT.
Audience pulumi.StringPtrOutput `pulumi:"audience"`
// Unique name of the kubernetes backend to configure.
Backend pulumi.StringPtrOutput `pulumi:"backend"`
// If set, a list of
// CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
//
// Deprecated: use `token_bound_cidrs` instead if you are running Vault >= 1.2
BoundCidrs pulumi.StringArrayOutput `pulumi:"boundCidrs"`
// List of service account names able to access this role. If set to `["*"]` all names are allowed, both this and boundServiceAccountNamespaces can not be "*".
BoundServiceAccountNames pulumi.StringArrayOutput `pulumi:"boundServiceAccountNames"`
// List of namespaces allowed to access this role. If set to `["*"]` all namespaces are allowed, both this and boundServiceAccountNames can not be set to "*".
BoundServiceAccountNamespaces pulumi.StringArrayOutput `pulumi:"boundServiceAccountNamespaces"`
// The maximum allowed lifetime of tokens
// issued using this role, provided as a number of seconds.
//
// Deprecated: use `token_max_ttl` instead if you are running Vault >= 1.2
MaxTtl pulumi.IntPtrOutput `pulumi:"maxTtl"`
// If set, puts a use-count
// limitation on the issued token.
//
// Deprecated: use `token_num_uses` instead if you are running Vault >= 1.2
NumUses pulumi.IntPtrOutput `pulumi:"numUses"`
// If set, indicates that the
// token generated using this role should never expire. The token should be renewed within the
// duration specified by this value. At each renewal, the token's TTL will be set to the
// value of this field. Specified in seconds.
//
// Deprecated: use `token_period` instead if you are running Vault >= 1.2
Period pulumi.IntPtrOutput `pulumi:"period"`
// An array of strings
// specifying the policies to be set on tokens issued using this role.
//
// Deprecated: use `token_policies` instead if you are running Vault >= 1.2
Policies pulumi.StringArrayOutput `pulumi:"policies"`
// Name of the role.
RoleName pulumi.StringOutput `pulumi:"roleName"`
// List of CIDR blocks; if set, specifies blocks of IP
// addresses which can authenticate successfully, and ties the resulting token to these blocks
// as well.
TokenBoundCidrs pulumi.StringArrayOutput `pulumi:"tokenBoundCidrs"`
// If set, will encode an
// [explicit max TTL](https://www.vaultproject.io/docs/concepts/tokens.html#token-time-to-live-periodic-tokens-and-explicit-max-ttls)
// onto the token in number of seconds. This is a hard cap even if `tokenTtl` and
// `tokenMaxTtl` would otherwise allow a renewal.
TokenExplicitMaxTtl pulumi.IntPtrOutput `pulumi:"tokenExplicitMaxTtl"`
// The maximum lifetime for generated tokens in number of seconds.
// Its current value will be referenced at renewal time.
TokenMaxTtl pulumi.IntPtrOutput `pulumi:"tokenMaxTtl"`
// If set, the default policy will not be set on
// generated tokens; otherwise it will be added to the policies set in token_policies.
TokenNoDefaultPolicy pulumi.BoolPtrOutput `pulumi:"tokenNoDefaultPolicy"`
// The
// [period](https://www.vaultproject.io/docs/concepts/tokens.html#token-time-to-live-periodic-tokens-and-explicit-max-ttls),
// if any, in number of seconds to set on the token.
TokenNumUses pulumi.IntPtrOutput `pulumi:"tokenNumUses"`
// If set, indicates that the
// token generated using this role should never expire. The token should be renewed within the
// duration specified by this value. At each renewal, the token's TTL will be set to the
// value of this field. Specified in seconds.
TokenPeriod pulumi.IntPtrOutput `pulumi:"tokenPeriod"`
// List of policies to encode onto generated tokens. Depending
// on the auth method, this list may be supplemented by user/group/other values.
TokenPolicies pulumi.StringArrayOutput `pulumi:"tokenPolicies"`
// The incremental lifetime for generated tokens in number of seconds.
// Its current value will be referenced at renewal time.
TokenTtl pulumi.IntPtrOutput `pulumi:"tokenTtl"`
// The type of token that should be generated. Can be `service`,
// `batch`, or `default` to use the mount's tuned default (which unless changed will be
// `service` tokens). For token store roles, there are two additional possibilities:
// `default-service` and `default-batch` which specify the type to return unless the client
// requests a different type at generation time.
TokenType pulumi.StringPtrOutput `pulumi:"tokenType"`
// The TTL period of tokens issued
// using this role, provided as a number of seconds.
//
// Deprecated: use `token_ttl` instead if you are running Vault >= 1.2
Ttl pulumi.IntPtrOutput `pulumi:"ttl"`
}
// NewAuthBackendRole registers a new resource with the given unique name, arguments, and options.
func NewAuthBackendRole(ctx *pulumi.Context,
name string, args *AuthBackendRoleArgs, opts ...pulumi.ResourceOption) (*AuthBackendRole, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BoundServiceAccountNames == nil {
return nil, errors.New("invalid value for required argument 'BoundServiceAccountNames'")
}
if args.BoundServiceAccountNamespaces == nil {
return nil, errors.New("invalid value for required argument 'BoundServiceAccountNamespaces'")
}
if args.RoleName == nil {
return nil, errors.New("invalid value for required argument 'RoleName'")
}
var resource AuthBackendRole
err := ctx.RegisterResource("vault:kubernetes/authBackendRole:AuthBackendRole", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAuthBackendRole gets an existing AuthBackendRole 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 GetAuthBackendRole(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AuthBackendRoleState, opts ...pulumi.ResourceOption) (*AuthBackendRole, error) {
var resource AuthBackendRole
err := ctx.ReadResource("vault:kubernetes/authBackendRole:AuthBackendRole", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AuthBackendRole resources.
type authBackendRoleState struct {
// Audience claim to verify in the JWT.
Audience *string `pulumi:"audience"`
// Unique name of the kubernetes backend to configure.
Backend *string `pulumi:"backend"`
// If set, a list of
// CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
//
// Deprecated: use `token_bound_cidrs` instead if you are running Vault >= 1.2
BoundCidrs []string `pulumi:"boundCidrs"`
// List of service account names able to access this role. If set to `["*"]` all names are allowed, both this and boundServiceAccountNamespaces can not be "*".
BoundServiceAccountNames []string `pulumi:"boundServiceAccountNames"`
// List of namespaces allowed to access this role. If set to `["*"]` all namespaces are allowed, both this and boundServiceAccountNames can not be set to "*".
BoundServiceAccountNamespaces []string `pulumi:"boundServiceAccountNamespaces"`
// The maximum allowed lifetime of tokens
// issued using this role, provided as a number of seconds.
//
// Deprecated: use `token_max_ttl` instead if you are running Vault >= 1.2
MaxTtl *int `pulumi:"maxTtl"`
// If set, puts a use-count
// limitation on the issued token.
//
// Deprecated: use `token_num_uses` instead if you are running Vault >= 1.2
NumUses *int `pulumi:"numUses"`
// If set, indicates that the
// token generated using this role should never expire. The token should be renewed within the
// duration specified by this value. At each renewal, the token's TTL will be set to the
// value of this field. Specified in seconds.
//
// Deprecated: use `token_period` instead if you are running Vault >= 1.2
Period *int `pulumi:"period"`
// An array of strings
// specifying the policies to be set on tokens issued using this role.
//
// Deprecated: use `token_policies` instead if you are running Vault >= 1.2
Policies []string `pulumi:"policies"`
// Name of the role.
RoleName *string `pulumi:"roleName"`
// List of CIDR blocks; if set, specifies blocks of IP
// addresses which can authenticate successfully, and ties the resulting token to these blocks
// as well.
TokenBoundCidrs []string `pulumi:"tokenBoundCidrs"`
// If set, will encode an
// [explicit max TTL](https://www.vaultproject.io/docs/concepts/tokens.html#token-time-to-live-periodic-tokens-and-explicit-max-ttls)
// onto the token in number of seconds. This is a hard cap even if `tokenTtl` and
// `tokenMaxTtl` would otherwise allow a renewal.
TokenExplicitMaxTtl *int `pulumi:"tokenExplicitMaxTtl"`
// The maximum lifetime for generated tokens in number of seconds.
// Its current value will be referenced at renewal time.
TokenMaxTtl *int `pulumi:"tokenMaxTtl"`
// If set, the default policy will not be set on
// generated tokens; otherwise it will be added to the policies set in token_policies.
TokenNoDefaultPolicy *bool `pulumi:"tokenNoDefaultPolicy"`
// The
// [period](https://www.vaultproject.io/docs/concepts/tokens.html#token-time-to-live-periodic-tokens-and-explicit-max-ttls),
// if any, in number of seconds to set on the token.
TokenNumUses *int `pulumi:"tokenNumUses"`
// If set, indicates that the
// token generated using this role should never expire. The token should be renewed within the
// duration specified by this value. At each renewal, the token's TTL will be set to the
// value of this field. Specified in seconds.
TokenPeriod *int `pulumi:"tokenPeriod"`
// List of policies to encode onto generated tokens. Depending
// on the auth method, this list may be supplemented by user/group/other values.
TokenPolicies []string `pulumi:"tokenPolicies"`
// The incremental lifetime for generated tokens in number of seconds.
// Its current value will be referenced at renewal time.
TokenTtl *int `pulumi:"tokenTtl"`
// The type of token that should be generated. Can be `service`,
// `batch`, or `default` to use the mount's tuned default (which unless changed will be
// `service` tokens). For token store roles, there are two additional possibilities:
// `default-service` and `default-batch` which specify the type to return unless the client
// requests a different type at generation time.
TokenType *string `pulumi:"tokenType"`
// The TTL period of tokens issued
// using this role, provided as a number of seconds.
//
// Deprecated: use `token_ttl` instead if you are running Vault >= 1.2
Ttl *int `pulumi:"ttl"`
}
type AuthBackendRoleState struct {
// Audience claim to verify in the JWT.
Audience pulumi.StringPtrInput
// Unique name of the kubernetes backend to configure.
Backend pulumi.StringPtrInput
// If set, a list of
// CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
//
// Deprecated: use `token_bound_cidrs` instead if you are running Vault >= 1.2
BoundCidrs pulumi.StringArrayInput
// List of service account names able to access this role. If set to `["*"]` all names are allowed, both this and boundServiceAccountNamespaces can not be "*".
BoundServiceAccountNames pulumi.StringArrayInput
// List of namespaces allowed to access this role. If set to `["*"]` all namespaces are allowed, both this and boundServiceAccountNames can not be set to "*".
BoundServiceAccountNamespaces pulumi.StringArrayInput
// The maximum allowed lifetime of tokens
// issued using this role, provided as a number of seconds.
//
// Deprecated: use `token_max_ttl` instead if you are running Vault >= 1.2
MaxTtl pulumi.IntPtrInput
// If set, puts a use-count
// limitation on the issued token.
//
// Deprecated: use `token_num_uses` instead if you are running Vault >= 1.2
NumUses pulumi.IntPtrInput
// If set, indicates that the
// token generated using this role should never expire. The token should be renewed within the
// duration specified by this value. At each renewal, the token's TTL will be set to the
// value of this field. Specified in seconds.
//
// Deprecated: use `token_period` instead if you are running Vault >= 1.2
Period pulumi.IntPtrInput
// An array of strings
// specifying the policies to be set on tokens issued using this role.
//
// Deprecated: use `token_policies` instead if you are running Vault >= 1.2
Policies pulumi.StringArrayInput
// Name of the role.
RoleName pulumi.StringPtrInput
// List of CIDR blocks; if set, specifies blocks of IP
// addresses which can authenticate successfully, and ties the resulting token to these blocks
// as well.
TokenBoundCidrs pulumi.StringArrayInput
// If set, will encode an
// [explicit max TTL](https://www.vaultproject.io/docs/concepts/tokens.html#token-time-to-live-periodic-tokens-and-explicit-max-ttls)
// onto the token in number of seconds. This is a hard cap even if `tokenTtl` and
// `tokenMaxTtl` would otherwise allow a renewal.
TokenExplicitMaxTtl pulumi.IntPtrInput
// The maximum lifetime for generated tokens in number of seconds.
// Its current value will be referenced at renewal time.
TokenMaxTtl pulumi.IntPtrInput
// If set, the default policy will not be set on
// generated tokens; otherwise it will be added to the policies set in token_policies.
TokenNoDefaultPolicy pulumi.BoolPtrInput
// The
// [period](https://www.vaultproject.io/docs/concepts/tokens.html#token-time-to-live-periodic-tokens-and-explicit-max-ttls),
// if any, in number of seconds to set on the token.
TokenNumUses pulumi.IntPtrInput
// If set, indicates that the
// token generated using this role should never expire. The token should be renewed within the
// duration specified by this value. At each renewal, the token's TTL will be set to the
// value of this field. Specified in seconds.
TokenPeriod pulumi.IntPtrInput
// List of policies to encode onto generated tokens. Depending
// on the auth method, this list may be supplemented by user/group/other values.
TokenPolicies pulumi.StringArrayInput
// The incremental lifetime for generated tokens in number of seconds.
// Its current value will be referenced at renewal time.
TokenTtl pulumi.IntPtrInput
// The type of token that should be generated. Can be `service`,
// `batch`, or `default` to use the mount's tuned default (which unless changed will be
// `service` tokens). For token store roles, there are two additional possibilities:
// `default-service` and `default-batch` which specify the type to return unless the client
// requests a different type at generation time.
TokenType pulumi.StringPtrInput
// The TTL period of tokens issued
// using this role, provided as a number of seconds.
//
// Deprecated: use `token_ttl` instead if you are running Vault >= 1.2
Ttl pulumi.IntPtrInput
}
func (AuthBackendRoleState) ElementType() reflect.Type {
return reflect.TypeOf((*authBackendRoleState)(nil)).Elem()
}
type authBackendRoleArgs struct {
// Audience claim to verify in the JWT.
Audience *string `pulumi:"audience"`
// Unique name of the kubernetes backend to configure.
Backend *string `pulumi:"backend"`
// If set, a list of
// CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
//
// Deprecated: use `token_bound_cidrs` instead if you are running Vault >= 1.2
BoundCidrs []string `pulumi:"boundCidrs"`
// List of service account names able to access this role. If set to `["*"]` all names are allowed, both this and boundServiceAccountNamespaces can not be "*".
BoundServiceAccountNames []string `pulumi:"boundServiceAccountNames"`
// List of namespaces allowed to access this role. If set to `["*"]` all namespaces are allowed, both this and boundServiceAccountNames can not be set to "*".
BoundServiceAccountNamespaces []string `pulumi:"boundServiceAccountNamespaces"`
// The maximum allowed lifetime of tokens
// issued using this role, provided as a number of seconds.
//
// Deprecated: use `token_max_ttl` instead if you are running Vault >= 1.2
MaxTtl *int `pulumi:"maxTtl"`
// If set, puts a use-count
// limitation on the issued token.
//
// Deprecated: use `token_num_uses` instead if you are running Vault >= 1.2
NumUses *int `pulumi:"numUses"`
// If set, indicates that the
// token generated using this role should never expire. The token should be renewed within the
// duration specified by this value. At each renewal, the token's TTL will be set to the
// value of this field. Specified in seconds.
//
// Deprecated: use `token_period` instead if you are running Vault >= 1.2
Period *int `pulumi:"period"`
// An array of strings
// specifying the policies to be set on tokens issued using this role.
//
// Deprecated: use `token_policies` instead if you are running Vault >= 1.2
Policies []string `pulumi:"policies"`
// Name of the role.
RoleName string `pulumi:"roleName"`
// List of CIDR blocks; if set, specifies blocks of IP
// addresses which can authenticate successfully, and ties the resulting token to these blocks
// as well.
TokenBoundCidrs []string `pulumi:"tokenBoundCidrs"`
// If set, will encode an
// [explicit max TTL](https://www.vaultproject.io/docs/concepts/tokens.html#token-time-to-live-periodic-tokens-and-explicit-max-ttls)
// onto the token in number of seconds. This is a hard cap even if `tokenTtl` and
// `tokenMaxTtl` would otherwise allow a renewal.
TokenExplicitMaxTtl *int `pulumi:"tokenExplicitMaxTtl"`
// The maximum lifetime for generated tokens in number of seconds.
// Its current value will be referenced at renewal time.
TokenMaxTtl *int `pulumi:"tokenMaxTtl"`
// If set, the default policy will not be set on
// generated tokens; otherwise it will be added to the policies set in token_policies.
TokenNoDefaultPolicy *bool `pulumi:"tokenNoDefaultPolicy"`
// The
// [period](https://www.vaultproject.io/docs/concepts/tokens.html#token-time-to-live-periodic-tokens-and-explicit-max-ttls),
// if any, in number of seconds to set on the token.
TokenNumUses *int `pulumi:"tokenNumUses"`
// If set, indicates that the
// token generated using this role should never expire. The token should be renewed within the
// duration specified by this value. At each renewal, the token's TTL will be set to the
// value of this field. Specified in seconds.
TokenPeriod *int `pulumi:"tokenPeriod"`
// List of policies to encode onto generated tokens. Depending
// on the auth method, this list may be supplemented by user/group/other values.
TokenPolicies []string `pulumi:"tokenPolicies"`
// The incremental lifetime for generated tokens in number of seconds.
// Its current value will be referenced at renewal time.
TokenTtl *int `pulumi:"tokenTtl"`
// The type of token that should be generated. Can be `service`,
// `batch`, or `default` to use the mount's tuned default (which unless changed will be
// `service` tokens). For token store roles, there are two additional possibilities:
// `default-service` and `default-batch` which specify the type to return unless the client
// requests a different type at generation time.
TokenType *string `pulumi:"tokenType"`
// The TTL period of tokens issued
// using this role, provided as a number of seconds.
//
// Deprecated: use `token_ttl` instead if you are running Vault >= 1.2
Ttl *int `pulumi:"ttl"`
}
// The set of arguments for constructing a AuthBackendRole resource.
type AuthBackendRoleArgs struct {
// Audience claim to verify in the JWT.
Audience pulumi.StringPtrInput
// Unique name of the kubernetes backend to configure.
Backend pulumi.StringPtrInput
// If set, a list of
// CIDRs valid as the source address for login requests. This value is also encoded into any resulting token.
//
// Deprecated: use `token_bound_cidrs` instead if you are running Vault >= 1.2
BoundCidrs pulumi.StringArrayInput
// List of service account names able to access this role. If set to `["*"]` all names are allowed, both this and boundServiceAccountNamespaces can not be "*".
BoundServiceAccountNames pulumi.StringArrayInput
// List of namespaces allowed to access this role. If set to `["*"]` all namespaces are allowed, both this and boundServiceAccountNames can not be set to "*".
BoundServiceAccountNamespaces pulumi.StringArrayInput
// The maximum allowed lifetime of tokens
// issued using this role, provided as a number of seconds.
//
// Deprecated: use `token_max_ttl` instead if you are running Vault >= 1.2
MaxTtl pulumi.IntPtrInput
// If set, puts a use-count
// limitation on the issued token.
//
// Deprecated: use `token_num_uses` instead if you are running Vault >= 1.2
NumUses pulumi.IntPtrInput
// If set, indicates that the
// token generated using this role should never expire. The token should be renewed within the
// duration specified by this value. At each renewal, the token's TTL will be set to the
// value of this field. Specified in seconds.
//
// Deprecated: use `token_period` instead if you are running Vault >= 1.2
Period pulumi.IntPtrInput
// An array of strings
// specifying the policies to be set on tokens issued using this role.
//
// Deprecated: use `token_policies` instead if you are running Vault >= 1.2
Policies pulumi.StringArrayInput
// Name of the role.
RoleName pulumi.StringInput
// List of CIDR blocks; if set, specifies blocks of IP
// addresses which can authenticate successfully, and ties the resulting token to these blocks
// as well.
TokenBoundCidrs pulumi.StringArrayInput
// If set, will encode an
// [explicit max TTL](https://www.vaultproject.io/docs/concepts/tokens.html#token-time-to-live-periodic-tokens-and-explicit-max-ttls)
// onto the token in number of seconds. This is a hard cap even if `tokenTtl` and
// `tokenMaxTtl` would otherwise allow a renewal.
TokenExplicitMaxTtl pulumi.IntPtrInput
// The maximum lifetime for generated tokens in number of seconds.
// Its current value will be referenced at renewal time.
TokenMaxTtl pulumi.IntPtrInput
// If set, the default policy will not be set on
// generated tokens; otherwise it will be added to the policies set in token_policies.
TokenNoDefaultPolicy pulumi.BoolPtrInput
// The
// [period](https://www.vaultproject.io/docs/concepts/tokens.html#token-time-to-live-periodic-tokens-and-explicit-max-ttls),
// if any, in number of seconds to set on the token.
TokenNumUses pulumi.IntPtrInput
// If set, indicates that the
// token generated using this role should never expire. The token should be renewed within the
// duration specified by this value. At each renewal, the token's TTL will be set to the
// value of this field. Specified in seconds.
TokenPeriod pulumi.IntPtrInput
// List of policies to encode onto generated tokens. Depending
// on the auth method, this list may be supplemented by user/group/other values.
TokenPolicies pulumi.StringArrayInput
// The incremental lifetime for generated tokens in number of seconds.
// Its current value will be referenced at renewal time.
TokenTtl pulumi.IntPtrInput
// The type of token that should be generated. Can be `service`,
// `batch`, or `default` to use the mount's tuned default (which unless changed will be
// `service` tokens). For token store roles, there are two additional possibilities:
// `default-service` and `default-batch` which specify the type to return unless the client
// requests a different type at generation time.
TokenType pulumi.StringPtrInput
// The TTL period of tokens issued
// using this role, provided as a number of seconds.
//
// Deprecated: use `token_ttl` instead if you are running Vault >= 1.2
Ttl pulumi.IntPtrInput
}
func (AuthBackendRoleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*authBackendRoleArgs)(nil)).Elem()
}
type AuthBackendRoleInput interface {
pulumi.Input
ToAuthBackendRoleOutput() AuthBackendRoleOutput
ToAuthBackendRoleOutputWithContext(ctx context.Context) AuthBackendRoleOutput
}
func (*AuthBackendRole) ElementType() reflect.Type {
return reflect.TypeOf((*AuthBackendRole)(nil))
}
func (i *AuthBackendRole) ToAuthBackendRoleOutput() AuthBackendRoleOutput {
return i.ToAuthBackendRoleOutputWithContext(context.Background())
}
func (i *AuthBackendRole) ToAuthBackendRoleOutputWithContext(ctx context.Context) AuthBackendRoleOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuthBackendRoleOutput)
}
func (i *AuthBackendRole) ToAuthBackendRolePtrOutput() AuthBackendRolePtrOutput {
return i.ToAuthBackendRolePtrOutputWithContext(context.Background())
}
func (i *AuthBackendRole) ToAuthBackendRolePtrOutputWithContext(ctx context.Context) AuthBackendRolePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuthBackendRolePtrOutput)
}
type AuthBackendRolePtrInput interface {
pulumi.Input
ToAuthBackendRolePtrOutput() AuthBackendRolePtrOutput
ToAuthBackendRolePtrOutputWithContext(ctx context.Context) AuthBackendRolePtrOutput
}
type authBackendRolePtrType AuthBackendRoleArgs
func (*authBackendRolePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AuthBackendRole)(nil))
}
func (i *authBackendRolePtrType) ToAuthBackendRolePtrOutput() AuthBackendRolePtrOutput {
return i.ToAuthBackendRolePtrOutputWithContext(context.Background())
}
func (i *authBackendRolePtrType) ToAuthBackendRolePtrOutputWithContext(ctx context.Context) AuthBackendRolePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuthBackendRolePtrOutput)
}
// AuthBackendRoleArrayInput is an input type that accepts AuthBackendRoleArray and AuthBackendRoleArrayOutput values.
// You can construct a concrete instance of `AuthBackendRoleArrayInput` via:
//
// AuthBackendRoleArray{ AuthBackendRoleArgs{...} }
type AuthBackendRoleArrayInput interface {
pulumi.Input
ToAuthBackendRoleArrayOutput() AuthBackendRoleArrayOutput
ToAuthBackendRoleArrayOutputWithContext(context.Context) AuthBackendRoleArrayOutput
}
type AuthBackendRoleArray []AuthBackendRoleInput
func (AuthBackendRoleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AuthBackendRole)(nil)).Elem()
}
func (i AuthBackendRoleArray) ToAuthBackendRoleArrayOutput() AuthBackendRoleArrayOutput {
return i.ToAuthBackendRoleArrayOutputWithContext(context.Background())
}
func (i AuthBackendRoleArray) ToAuthBackendRoleArrayOutputWithContext(ctx context.Context) AuthBackendRoleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuthBackendRoleArrayOutput)
}
// AuthBackendRoleMapInput is an input type that accepts AuthBackendRoleMap and AuthBackendRoleMapOutput values.
// You can construct a concrete instance of `AuthBackendRoleMapInput` via:
//
// AuthBackendRoleMap{ "key": AuthBackendRoleArgs{...} }
type AuthBackendRoleMapInput interface {
pulumi.Input
ToAuthBackendRoleMapOutput() AuthBackendRoleMapOutput
ToAuthBackendRoleMapOutputWithContext(context.Context) AuthBackendRoleMapOutput
}
type AuthBackendRoleMap map[string]AuthBackendRoleInput
func (AuthBackendRoleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AuthBackendRole)(nil)).Elem()
}
func (i AuthBackendRoleMap) ToAuthBackendRoleMapOutput() AuthBackendRoleMapOutput {
return i.ToAuthBackendRoleMapOutputWithContext(context.Background())
}
func (i AuthBackendRoleMap) ToAuthBackendRoleMapOutputWithContext(ctx context.Context) AuthBackendRoleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuthBackendRoleMapOutput)
}
type AuthBackendRoleOutput struct{ *pulumi.OutputState }
func (AuthBackendRoleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AuthBackendRole)(nil))
}
func (o AuthBackendRoleOutput) ToAuthBackendRoleOutput() AuthBackendRoleOutput {
return o
}
func (o AuthBackendRoleOutput) ToAuthBackendRoleOutputWithContext(ctx context.Context) AuthBackendRoleOutput {
return o
}
func (o AuthBackendRoleOutput) ToAuthBackendRolePtrOutput() AuthBackendRolePtrOutput {
return o.ToAuthBackendRolePtrOutputWithContext(context.Background())
}
func (o AuthBackendRoleOutput) ToAuthBackendRolePtrOutputWithContext(ctx context.Context) AuthBackendRolePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AuthBackendRole) *AuthBackendRole {
return &v
}).(AuthBackendRolePtrOutput)
}
type AuthBackendRolePtrOutput struct{ *pulumi.OutputState }
func (AuthBackendRolePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AuthBackendRole)(nil))
}
func (o AuthBackendRolePtrOutput) ToAuthBackendRolePtrOutput() AuthBackendRolePtrOutput {
return o
}
func (o AuthBackendRolePtrOutput) ToAuthBackendRolePtrOutputWithContext(ctx context.Context) AuthBackendRolePtrOutput {
return o
}
func (o AuthBackendRolePtrOutput) Elem() AuthBackendRoleOutput {
return o.ApplyT(func(v *AuthBackendRole) AuthBackendRole {
if v != nil {
return *v
}
var ret AuthBackendRole
return ret
}).(AuthBackendRoleOutput)
}
type AuthBackendRoleArrayOutput struct{ *pulumi.OutputState }
func (AuthBackendRoleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]AuthBackendRole)(nil))
}
func (o AuthBackendRoleArrayOutput) ToAuthBackendRoleArrayOutput() AuthBackendRoleArrayOutput {
return o
}
func (o AuthBackendRoleArrayOutput) ToAuthBackendRoleArrayOutputWithContext(ctx context.Context) AuthBackendRoleArrayOutput {
return o
}
func (o AuthBackendRoleArrayOutput) Index(i pulumi.IntInput) AuthBackendRoleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) AuthBackendRole {
return vs[0].([]AuthBackendRole)[vs[1].(int)]
}).(AuthBackendRoleOutput)
}
type AuthBackendRoleMapOutput struct{ *pulumi.OutputState }
func (AuthBackendRoleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]AuthBackendRole)(nil))
}
func (o AuthBackendRoleMapOutput) ToAuthBackendRoleMapOutput() AuthBackendRoleMapOutput {
return o
}
func (o AuthBackendRoleMapOutput) ToAuthBackendRoleMapOutputWithContext(ctx context.Context) AuthBackendRoleMapOutput {
return o
}
func (o AuthBackendRoleMapOutput) MapIndex(k pulumi.StringInput) AuthBackendRoleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) AuthBackendRole {
return vs[0].(map[string]AuthBackendRole)[vs[1].(string)]
}).(AuthBackendRoleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AuthBackendRoleInput)(nil)).Elem(), &AuthBackendRole{})
pulumi.RegisterInputType(reflect.TypeOf((*AuthBackendRolePtrInput)(nil)).Elem(), &AuthBackendRole{})
pulumi.RegisterInputType(reflect.TypeOf((*AuthBackendRoleArrayInput)(nil)).Elem(), AuthBackendRoleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AuthBackendRoleMapInput)(nil)).Elem(), AuthBackendRoleMap{})
pulumi.RegisterOutputType(AuthBackendRoleOutput{})
pulumi.RegisterOutputType(AuthBackendRolePtrOutput{})
pulumi.RegisterOutputType(AuthBackendRoleArrayOutput{})
pulumi.RegisterOutputType(AuthBackendRoleMapOutput{})
}