/
secretBackendRole.go
1003 lines (911 loc) · 47.6 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
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
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package pkisecret
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a role on an PKI Secret Backend for Vault.
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
// "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/pkiSecret"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// pki, err := vault.NewMount(ctx, "pki", &vault.MountArgs{
// Path: pulumi.String("pki"),
// Type: pulumi.String("pki"),
// DefaultLeaseTtlSeconds: pulumi.Int(3600),
// MaxLeaseTtlSeconds: pulumi.Int(86400),
// })
// if err != nil {
// return err
// }
// _, err = pkiSecret.NewSecretBackendRole(ctx, "role", &pkiSecret.SecretBackendRoleArgs{
// Backend: pki.Path,
// Ttl: pulumi.String("3600"),
// AllowIpSans: pulumi.Bool(true),
// KeyType: pulumi.String("rsa"),
// KeyBits: pulumi.Int(4096),
// AllowedDomains: pulumi.StringArray{
// pulumi.String("example.com"),
// pulumi.String("my.domain"),
// },
// AllowSubdomains: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
//
// ## Import
//
// PKI secret backend roles can be imported using the `path`, e.g.
//
// ```sh
// $ pulumi import vault:pkiSecret/secretBackendRole:SecretBackendRole role pki/roles/my_role
// ```
type SecretBackendRole struct {
pulumi.CustomResourceState
// Flag to allow any name
AllowAnyName pulumi.BoolPtrOutput `pulumi:"allowAnyName"`
// Flag to allow certificates matching the actual domain
AllowBareDomains pulumi.BoolPtrOutput `pulumi:"allowBareDomains"`
// Flag to allow names containing glob patterns.
AllowGlobDomains pulumi.BoolPtrOutput `pulumi:"allowGlobDomains"`
// Flag to allow IP SANs
AllowIpSans pulumi.BoolPtrOutput `pulumi:"allowIpSans"`
// Flag to allow certificates for localhost
AllowLocalhost pulumi.BoolPtrOutput `pulumi:"allowLocalhost"`
// Flag to allow certificates matching subdomains
AllowSubdomains pulumi.BoolPtrOutput `pulumi:"allowSubdomains"`
// Flag to allow wildcard certificates.
AllowWildcardCertificates pulumi.BoolPtrOutput `pulumi:"allowWildcardCertificates"`
// List of allowed domains for certificates
AllowedDomains pulumi.StringArrayOutput `pulumi:"allowedDomains"`
// Flag, if set, `allowedDomains` can be specified using identity template expressions such as `{{identity.entity.aliases.<mount accessor>.name}}`.
AllowedDomainsTemplate pulumi.BoolPtrOutput `pulumi:"allowedDomainsTemplate"`
// Defines allowed custom SANs
AllowedOtherSans pulumi.StringArrayOutput `pulumi:"allowedOtherSans"`
// An array of allowed serial numbers to put in Subject
AllowedSerialNumbers pulumi.StringArrayOutput `pulumi:"allowedSerialNumbers"`
// Defines allowed URI SANs
AllowedUriSans pulumi.StringArrayOutput `pulumi:"allowedUriSans"`
// Flag, if set, `allowedUriSans` can be specified using identity template expressions such as `{{identity.entity.aliases.<mount accessor>.name}}`.
AllowedUriSansTemplate pulumi.BoolOutput `pulumi:"allowedUriSansTemplate"`
// Defines allowed User IDs
AllowedUserIds pulumi.StringArrayOutput `pulumi:"allowedUserIds"`
// The path the PKI secret backend is mounted at, with no leading or trailing `/`s.
Backend pulumi.StringOutput `pulumi:"backend"`
// Flag to mark basic constraints valid when issuing non-CA certificates
BasicConstraintsValidForNonCa pulumi.BoolPtrOutput `pulumi:"basicConstraintsValidForNonCa"`
// Flag to specify certificates for client use
ClientFlag pulumi.BoolPtrOutput `pulumi:"clientFlag"`
// Flag to specify certificates for code signing use
CodeSigningFlag pulumi.BoolPtrOutput `pulumi:"codeSigningFlag"`
// The country of generated certificates
Countries pulumi.StringArrayOutput `pulumi:"countries"`
// Flag to specify certificates for email protection use
EmailProtectionFlag pulumi.BoolPtrOutput `pulumi:"emailProtectionFlag"`
// Flag to allow only valid host names
EnforceHostnames pulumi.BoolPtrOutput `pulumi:"enforceHostnames"`
// Specify the allowed extended key usage OIDs constraint on issued certificates
ExtKeyUsageOids pulumi.StringArrayOutput `pulumi:"extKeyUsageOids"`
// Specify the allowed extended key usage constraint on issued certificates
ExtKeyUsages pulumi.StringArrayOutput `pulumi:"extKeyUsages"`
// Flag to generate leases with certificates
GenerateLease pulumi.BoolPtrOutput `pulumi:"generateLease"`
// Specifies the default issuer of this request. May
// be the value `default`, a name, or an issuer ID. Use ACLs to prevent access to
// the `/pki/issuer/:issuer_ref/{issue,sign}/:name` paths to prevent users
// overriding the role's `issuerRef` value.
IssuerRef pulumi.StringOutput `pulumi:"issuerRef"`
// The number of bits of generated keys
KeyBits pulumi.IntPtrOutput `pulumi:"keyBits"`
// The generated key type, choices: `rsa`, `ec`, `ed25519`, `any`
// Defaults to `rsa`
KeyType pulumi.StringPtrOutput `pulumi:"keyType"`
// Specify the allowed key usage constraint on issued
// certificates. Defaults to `["DigitalSignature", "KeyAgreement", "KeyEncipherment"])`.
// To specify no default key usage constraints, set this to an empty list `[]`.
KeyUsages pulumi.StringArrayOutput `pulumi:"keyUsages"`
// The locality of generated certificates
Localities pulumi.StringArrayOutput `pulumi:"localities"`
// The maximum lease TTL, in seconds, for the role.
MaxTtl pulumi.StringOutput `pulumi:"maxTtl"`
// The name to identify this role within the backend. Must be unique within the backend.
Name pulumi.StringOutput `pulumi:"name"`
// The namespace to provision the resource in.
// The value should not contain leading or trailing forward slashes.
// The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
// *Available only for Vault Enterprise*.
Namespace pulumi.StringPtrOutput `pulumi:"namespace"`
// Flag to not store certificates in the storage backend
NoStore pulumi.BoolPtrOutput `pulumi:"noStore"`
// Specifies the duration by which to backdate the NotBefore property.
NotBeforeDuration pulumi.StringOutput `pulumi:"notBeforeDuration"`
// The organization unit of generated certificates
OrganizationUnit pulumi.StringArrayOutput `pulumi:"organizationUnit"`
// The organization of generated certificates
Organizations pulumi.StringArrayOutput `pulumi:"organizations"`
// (Vault 1.11+ only) A block for specifying policy identifers. The `policyIdentifier` block can be repeated, and supports the following arguments:
PolicyIdentifier SecretBackendRolePolicyIdentifierArrayOutput `pulumi:"policyIdentifier"`
// Specify the list of allowed policies OIDs. Use with Vault 1.10 or before. For Vault 1.11+, use `policyIdentifier` blocks instead
PolicyIdentifiers pulumi.StringArrayOutput `pulumi:"policyIdentifiers"`
// The postal code of generated certificates
PostalCodes pulumi.StringArrayOutput `pulumi:"postalCodes"`
// The province of generated certificates
Provinces pulumi.StringArrayOutput `pulumi:"provinces"`
// Flag to force CN usage
RequireCn pulumi.BoolPtrOutput `pulumi:"requireCn"`
// Flag to specify certificates for server use
ServerFlag pulumi.BoolPtrOutput `pulumi:"serverFlag"`
// The street address of generated certificates
StreetAddresses pulumi.StringArrayOutput `pulumi:"streetAddresses"`
// The TTL, in seconds, for any certificate issued against this role.
Ttl pulumi.StringOutput `pulumi:"ttl"`
// Flag to use the CN in the CSR
UseCsrCommonName pulumi.BoolPtrOutput `pulumi:"useCsrCommonName"`
// Flag to use the SANs in the CSR
UseCsrSans pulumi.BoolPtrOutput `pulumi:"useCsrSans"`
}
// 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'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SecretBackendRole
err := ctx.RegisterResource("vault:pkiSecret/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:pkiSecret/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 {
// Flag to allow any name
AllowAnyName *bool `pulumi:"allowAnyName"`
// Flag to allow certificates matching the actual domain
AllowBareDomains *bool `pulumi:"allowBareDomains"`
// Flag to allow names containing glob patterns.
AllowGlobDomains *bool `pulumi:"allowGlobDomains"`
// Flag to allow IP SANs
AllowIpSans *bool `pulumi:"allowIpSans"`
// Flag to allow certificates for localhost
AllowLocalhost *bool `pulumi:"allowLocalhost"`
// Flag to allow certificates matching subdomains
AllowSubdomains *bool `pulumi:"allowSubdomains"`
// Flag to allow wildcard certificates.
AllowWildcardCertificates *bool `pulumi:"allowWildcardCertificates"`
// List of allowed domains for certificates
AllowedDomains []string `pulumi:"allowedDomains"`
// Flag, if set, `allowedDomains` can be specified using identity template expressions such as `{{identity.entity.aliases.<mount accessor>.name}}`.
AllowedDomainsTemplate *bool `pulumi:"allowedDomainsTemplate"`
// Defines allowed custom SANs
AllowedOtherSans []string `pulumi:"allowedOtherSans"`
// An array of allowed serial numbers to put in Subject
AllowedSerialNumbers []string `pulumi:"allowedSerialNumbers"`
// Defines allowed URI SANs
AllowedUriSans []string `pulumi:"allowedUriSans"`
// Flag, if set, `allowedUriSans` can be specified using identity template expressions such as `{{identity.entity.aliases.<mount accessor>.name}}`.
AllowedUriSansTemplate *bool `pulumi:"allowedUriSansTemplate"`
// Defines allowed User IDs
AllowedUserIds []string `pulumi:"allowedUserIds"`
// The path the PKI secret backend is mounted at, with no leading or trailing `/`s.
Backend *string `pulumi:"backend"`
// Flag to mark basic constraints valid when issuing non-CA certificates
BasicConstraintsValidForNonCa *bool `pulumi:"basicConstraintsValidForNonCa"`
// Flag to specify certificates for client use
ClientFlag *bool `pulumi:"clientFlag"`
// Flag to specify certificates for code signing use
CodeSigningFlag *bool `pulumi:"codeSigningFlag"`
// The country of generated certificates
Countries []string `pulumi:"countries"`
// Flag to specify certificates for email protection use
EmailProtectionFlag *bool `pulumi:"emailProtectionFlag"`
// Flag to allow only valid host names
EnforceHostnames *bool `pulumi:"enforceHostnames"`
// Specify the allowed extended key usage OIDs constraint on issued certificates
ExtKeyUsageOids []string `pulumi:"extKeyUsageOids"`
// Specify the allowed extended key usage constraint on issued certificates
ExtKeyUsages []string `pulumi:"extKeyUsages"`
// Flag to generate leases with certificates
GenerateLease *bool `pulumi:"generateLease"`
// Specifies the default issuer of this request. May
// be the value `default`, a name, or an issuer ID. Use ACLs to prevent access to
// the `/pki/issuer/:issuer_ref/{issue,sign}/:name` paths to prevent users
// overriding the role's `issuerRef` value.
IssuerRef *string `pulumi:"issuerRef"`
// The number of bits of generated keys
KeyBits *int `pulumi:"keyBits"`
// The generated key type, choices: `rsa`, `ec`, `ed25519`, `any`
// Defaults to `rsa`
KeyType *string `pulumi:"keyType"`
// Specify the allowed key usage constraint on issued
// certificates. Defaults to `["DigitalSignature", "KeyAgreement", "KeyEncipherment"])`.
// To specify no default key usage constraints, set this to an empty list `[]`.
KeyUsages []string `pulumi:"keyUsages"`
// The locality of generated certificates
Localities []string `pulumi:"localities"`
// The maximum lease TTL, in seconds, for the role.
MaxTtl *string `pulumi:"maxTtl"`
// The name to identify this role within the backend. Must be unique within the backend.
Name *string `pulumi:"name"`
// The namespace to provision the resource in.
// The value should not contain leading or trailing forward slashes.
// The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
// *Available only for Vault Enterprise*.
Namespace *string `pulumi:"namespace"`
// Flag to not store certificates in the storage backend
NoStore *bool `pulumi:"noStore"`
// Specifies the duration by which to backdate the NotBefore property.
NotBeforeDuration *string `pulumi:"notBeforeDuration"`
// The organization unit of generated certificates
OrganizationUnit []string `pulumi:"organizationUnit"`
// The organization of generated certificates
Organizations []string `pulumi:"organizations"`
// (Vault 1.11+ only) A block for specifying policy identifers. The `policyIdentifier` block can be repeated, and supports the following arguments:
PolicyIdentifier []SecretBackendRolePolicyIdentifier `pulumi:"policyIdentifier"`
// Specify the list of allowed policies OIDs. Use with Vault 1.10 or before. For Vault 1.11+, use `policyIdentifier` blocks instead
PolicyIdentifiers []string `pulumi:"policyIdentifiers"`
// The postal code of generated certificates
PostalCodes []string `pulumi:"postalCodes"`
// The province of generated certificates
Provinces []string `pulumi:"provinces"`
// Flag to force CN usage
RequireCn *bool `pulumi:"requireCn"`
// Flag to specify certificates for server use
ServerFlag *bool `pulumi:"serverFlag"`
// The street address of generated certificates
StreetAddresses []string `pulumi:"streetAddresses"`
// The TTL, in seconds, for any certificate issued against this role.
Ttl *string `pulumi:"ttl"`
// Flag to use the CN in the CSR
UseCsrCommonName *bool `pulumi:"useCsrCommonName"`
// Flag to use the SANs in the CSR
UseCsrSans *bool `pulumi:"useCsrSans"`
}
type SecretBackendRoleState struct {
// Flag to allow any name
AllowAnyName pulumi.BoolPtrInput
// Flag to allow certificates matching the actual domain
AllowBareDomains pulumi.BoolPtrInput
// Flag to allow names containing glob patterns.
AllowGlobDomains pulumi.BoolPtrInput
// Flag to allow IP SANs
AllowIpSans pulumi.BoolPtrInput
// Flag to allow certificates for localhost
AllowLocalhost pulumi.BoolPtrInput
// Flag to allow certificates matching subdomains
AllowSubdomains pulumi.BoolPtrInput
// Flag to allow wildcard certificates.
AllowWildcardCertificates pulumi.BoolPtrInput
// List of allowed domains for certificates
AllowedDomains pulumi.StringArrayInput
// Flag, if set, `allowedDomains` can be specified using identity template expressions such as `{{identity.entity.aliases.<mount accessor>.name}}`.
AllowedDomainsTemplate pulumi.BoolPtrInput
// Defines allowed custom SANs
AllowedOtherSans pulumi.StringArrayInput
// An array of allowed serial numbers to put in Subject
AllowedSerialNumbers pulumi.StringArrayInput
// Defines allowed URI SANs
AllowedUriSans pulumi.StringArrayInput
// Flag, if set, `allowedUriSans` can be specified using identity template expressions such as `{{identity.entity.aliases.<mount accessor>.name}}`.
AllowedUriSansTemplate pulumi.BoolPtrInput
// Defines allowed User IDs
AllowedUserIds pulumi.StringArrayInput
// The path the PKI secret backend is mounted at, with no leading or trailing `/`s.
Backend pulumi.StringPtrInput
// Flag to mark basic constraints valid when issuing non-CA certificates
BasicConstraintsValidForNonCa pulumi.BoolPtrInput
// Flag to specify certificates for client use
ClientFlag pulumi.BoolPtrInput
// Flag to specify certificates for code signing use
CodeSigningFlag pulumi.BoolPtrInput
// The country of generated certificates
Countries pulumi.StringArrayInput
// Flag to specify certificates for email protection use
EmailProtectionFlag pulumi.BoolPtrInput
// Flag to allow only valid host names
EnforceHostnames pulumi.BoolPtrInput
// Specify the allowed extended key usage OIDs constraint on issued certificates
ExtKeyUsageOids pulumi.StringArrayInput
// Specify the allowed extended key usage constraint on issued certificates
ExtKeyUsages pulumi.StringArrayInput
// Flag to generate leases with certificates
GenerateLease pulumi.BoolPtrInput
// Specifies the default issuer of this request. May
// be the value `default`, a name, or an issuer ID. Use ACLs to prevent access to
// the `/pki/issuer/:issuer_ref/{issue,sign}/:name` paths to prevent users
// overriding the role's `issuerRef` value.
IssuerRef pulumi.StringPtrInput
// The number of bits of generated keys
KeyBits pulumi.IntPtrInput
// The generated key type, choices: `rsa`, `ec`, `ed25519`, `any`
// Defaults to `rsa`
KeyType pulumi.StringPtrInput
// Specify the allowed key usage constraint on issued
// certificates. Defaults to `["DigitalSignature", "KeyAgreement", "KeyEncipherment"])`.
// To specify no default key usage constraints, set this to an empty list `[]`.
KeyUsages pulumi.StringArrayInput
// The locality of generated certificates
Localities pulumi.StringArrayInput
// The maximum lease TTL, in seconds, for the role.
MaxTtl pulumi.StringPtrInput
// The name to identify this role within the backend. Must be unique within the backend.
Name pulumi.StringPtrInput
// The namespace to provision the resource in.
// The value should not contain leading or trailing forward slashes.
// The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
// *Available only for Vault Enterprise*.
Namespace pulumi.StringPtrInput
// Flag to not store certificates in the storage backend
NoStore pulumi.BoolPtrInput
// Specifies the duration by which to backdate the NotBefore property.
NotBeforeDuration pulumi.StringPtrInput
// The organization unit of generated certificates
OrganizationUnit pulumi.StringArrayInput
// The organization of generated certificates
Organizations pulumi.StringArrayInput
// (Vault 1.11+ only) A block for specifying policy identifers. The `policyIdentifier` block can be repeated, and supports the following arguments:
PolicyIdentifier SecretBackendRolePolicyIdentifierArrayInput
// Specify the list of allowed policies OIDs. Use with Vault 1.10 or before. For Vault 1.11+, use `policyIdentifier` blocks instead
PolicyIdentifiers pulumi.StringArrayInput
// The postal code of generated certificates
PostalCodes pulumi.StringArrayInput
// The province of generated certificates
Provinces pulumi.StringArrayInput
// Flag to force CN usage
RequireCn pulumi.BoolPtrInput
// Flag to specify certificates for server use
ServerFlag pulumi.BoolPtrInput
// The street address of generated certificates
StreetAddresses pulumi.StringArrayInput
// The TTL, in seconds, for any certificate issued against this role.
Ttl pulumi.StringPtrInput
// Flag to use the CN in the CSR
UseCsrCommonName pulumi.BoolPtrInput
// Flag to use the SANs in the CSR
UseCsrSans pulumi.BoolPtrInput
}
func (SecretBackendRoleState) ElementType() reflect.Type {
return reflect.TypeOf((*secretBackendRoleState)(nil)).Elem()
}
type secretBackendRoleArgs struct {
// Flag to allow any name
AllowAnyName *bool `pulumi:"allowAnyName"`
// Flag to allow certificates matching the actual domain
AllowBareDomains *bool `pulumi:"allowBareDomains"`
// Flag to allow names containing glob patterns.
AllowGlobDomains *bool `pulumi:"allowGlobDomains"`
// Flag to allow IP SANs
AllowIpSans *bool `pulumi:"allowIpSans"`
// Flag to allow certificates for localhost
AllowLocalhost *bool `pulumi:"allowLocalhost"`
// Flag to allow certificates matching subdomains
AllowSubdomains *bool `pulumi:"allowSubdomains"`
// Flag to allow wildcard certificates.
AllowWildcardCertificates *bool `pulumi:"allowWildcardCertificates"`
// List of allowed domains for certificates
AllowedDomains []string `pulumi:"allowedDomains"`
// Flag, if set, `allowedDomains` can be specified using identity template expressions such as `{{identity.entity.aliases.<mount accessor>.name}}`.
AllowedDomainsTemplate *bool `pulumi:"allowedDomainsTemplate"`
// Defines allowed custom SANs
AllowedOtherSans []string `pulumi:"allowedOtherSans"`
// An array of allowed serial numbers to put in Subject
AllowedSerialNumbers []string `pulumi:"allowedSerialNumbers"`
// Defines allowed URI SANs
AllowedUriSans []string `pulumi:"allowedUriSans"`
// Flag, if set, `allowedUriSans` can be specified using identity template expressions such as `{{identity.entity.aliases.<mount accessor>.name}}`.
AllowedUriSansTemplate *bool `pulumi:"allowedUriSansTemplate"`
// Defines allowed User IDs
AllowedUserIds []string `pulumi:"allowedUserIds"`
// The path the PKI secret backend is mounted at, with no leading or trailing `/`s.
Backend string `pulumi:"backend"`
// Flag to mark basic constraints valid when issuing non-CA certificates
BasicConstraintsValidForNonCa *bool `pulumi:"basicConstraintsValidForNonCa"`
// Flag to specify certificates for client use
ClientFlag *bool `pulumi:"clientFlag"`
// Flag to specify certificates for code signing use
CodeSigningFlag *bool `pulumi:"codeSigningFlag"`
// The country of generated certificates
Countries []string `pulumi:"countries"`
// Flag to specify certificates for email protection use
EmailProtectionFlag *bool `pulumi:"emailProtectionFlag"`
// Flag to allow only valid host names
EnforceHostnames *bool `pulumi:"enforceHostnames"`
// Specify the allowed extended key usage OIDs constraint on issued certificates
ExtKeyUsageOids []string `pulumi:"extKeyUsageOids"`
// Specify the allowed extended key usage constraint on issued certificates
ExtKeyUsages []string `pulumi:"extKeyUsages"`
// Flag to generate leases with certificates
GenerateLease *bool `pulumi:"generateLease"`
// Specifies the default issuer of this request. May
// be the value `default`, a name, or an issuer ID. Use ACLs to prevent access to
// the `/pki/issuer/:issuer_ref/{issue,sign}/:name` paths to prevent users
// overriding the role's `issuerRef` value.
IssuerRef *string `pulumi:"issuerRef"`
// The number of bits of generated keys
KeyBits *int `pulumi:"keyBits"`
// The generated key type, choices: `rsa`, `ec`, `ed25519`, `any`
// Defaults to `rsa`
KeyType *string `pulumi:"keyType"`
// Specify the allowed key usage constraint on issued
// certificates. Defaults to `["DigitalSignature", "KeyAgreement", "KeyEncipherment"])`.
// To specify no default key usage constraints, set this to an empty list `[]`.
KeyUsages []string `pulumi:"keyUsages"`
// The locality of generated certificates
Localities []string `pulumi:"localities"`
// The maximum lease TTL, in seconds, for the role.
MaxTtl *string `pulumi:"maxTtl"`
// The name to identify this role within the backend. Must be unique within the backend.
Name *string `pulumi:"name"`
// The namespace to provision the resource in.
// The value should not contain leading or trailing forward slashes.
// The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
// *Available only for Vault Enterprise*.
Namespace *string `pulumi:"namespace"`
// Flag to not store certificates in the storage backend
NoStore *bool `pulumi:"noStore"`
// Specifies the duration by which to backdate the NotBefore property.
NotBeforeDuration *string `pulumi:"notBeforeDuration"`
// The organization unit of generated certificates
OrganizationUnit []string `pulumi:"organizationUnit"`
// The organization of generated certificates
Organizations []string `pulumi:"organizations"`
// (Vault 1.11+ only) A block for specifying policy identifers. The `policyIdentifier` block can be repeated, and supports the following arguments:
PolicyIdentifier []SecretBackendRolePolicyIdentifier `pulumi:"policyIdentifier"`
// Specify the list of allowed policies OIDs. Use with Vault 1.10 or before. For Vault 1.11+, use `policyIdentifier` blocks instead
PolicyIdentifiers []string `pulumi:"policyIdentifiers"`
// The postal code of generated certificates
PostalCodes []string `pulumi:"postalCodes"`
// The province of generated certificates
Provinces []string `pulumi:"provinces"`
// Flag to force CN usage
RequireCn *bool `pulumi:"requireCn"`
// Flag to specify certificates for server use
ServerFlag *bool `pulumi:"serverFlag"`
// The street address of generated certificates
StreetAddresses []string `pulumi:"streetAddresses"`
// The TTL, in seconds, for any certificate issued against this role.
Ttl *string `pulumi:"ttl"`
// Flag to use the CN in the CSR
UseCsrCommonName *bool `pulumi:"useCsrCommonName"`
// Flag to use the SANs in the CSR
UseCsrSans *bool `pulumi:"useCsrSans"`
}
// The set of arguments for constructing a SecretBackendRole resource.
type SecretBackendRoleArgs struct {
// Flag to allow any name
AllowAnyName pulumi.BoolPtrInput
// Flag to allow certificates matching the actual domain
AllowBareDomains pulumi.BoolPtrInput
// Flag to allow names containing glob patterns.
AllowGlobDomains pulumi.BoolPtrInput
// Flag to allow IP SANs
AllowIpSans pulumi.BoolPtrInput
// Flag to allow certificates for localhost
AllowLocalhost pulumi.BoolPtrInput
// Flag to allow certificates matching subdomains
AllowSubdomains pulumi.BoolPtrInput
// Flag to allow wildcard certificates.
AllowWildcardCertificates pulumi.BoolPtrInput
// List of allowed domains for certificates
AllowedDomains pulumi.StringArrayInput
// Flag, if set, `allowedDomains` can be specified using identity template expressions such as `{{identity.entity.aliases.<mount accessor>.name}}`.
AllowedDomainsTemplate pulumi.BoolPtrInput
// Defines allowed custom SANs
AllowedOtherSans pulumi.StringArrayInput
// An array of allowed serial numbers to put in Subject
AllowedSerialNumbers pulumi.StringArrayInput
// Defines allowed URI SANs
AllowedUriSans pulumi.StringArrayInput
// Flag, if set, `allowedUriSans` can be specified using identity template expressions such as `{{identity.entity.aliases.<mount accessor>.name}}`.
AllowedUriSansTemplate pulumi.BoolPtrInput
// Defines allowed User IDs
AllowedUserIds pulumi.StringArrayInput
// The path the PKI secret backend is mounted at, with no leading or trailing `/`s.
Backend pulumi.StringInput
// Flag to mark basic constraints valid when issuing non-CA certificates
BasicConstraintsValidForNonCa pulumi.BoolPtrInput
// Flag to specify certificates for client use
ClientFlag pulumi.BoolPtrInput
// Flag to specify certificates for code signing use
CodeSigningFlag pulumi.BoolPtrInput
// The country of generated certificates
Countries pulumi.StringArrayInput
// Flag to specify certificates for email protection use
EmailProtectionFlag pulumi.BoolPtrInput
// Flag to allow only valid host names
EnforceHostnames pulumi.BoolPtrInput
// Specify the allowed extended key usage OIDs constraint on issued certificates
ExtKeyUsageOids pulumi.StringArrayInput
// Specify the allowed extended key usage constraint on issued certificates
ExtKeyUsages pulumi.StringArrayInput
// Flag to generate leases with certificates
GenerateLease pulumi.BoolPtrInput
// Specifies the default issuer of this request. May
// be the value `default`, a name, or an issuer ID. Use ACLs to prevent access to
// the `/pki/issuer/:issuer_ref/{issue,sign}/:name` paths to prevent users
// overriding the role's `issuerRef` value.
IssuerRef pulumi.StringPtrInput
// The number of bits of generated keys
KeyBits pulumi.IntPtrInput
// The generated key type, choices: `rsa`, `ec`, `ed25519`, `any`
// Defaults to `rsa`
KeyType pulumi.StringPtrInput
// Specify the allowed key usage constraint on issued
// certificates. Defaults to `["DigitalSignature", "KeyAgreement", "KeyEncipherment"])`.
// To specify no default key usage constraints, set this to an empty list `[]`.
KeyUsages pulumi.StringArrayInput
// The locality of generated certificates
Localities pulumi.StringArrayInput
// The maximum lease TTL, in seconds, for the role.
MaxTtl pulumi.StringPtrInput
// The name to identify this role within the backend. Must be unique within the backend.
Name pulumi.StringPtrInput
// The namespace to provision the resource in.
// The value should not contain leading or trailing forward slashes.
// The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
// *Available only for Vault Enterprise*.
Namespace pulumi.StringPtrInput
// Flag to not store certificates in the storage backend
NoStore pulumi.BoolPtrInput
// Specifies the duration by which to backdate the NotBefore property.
NotBeforeDuration pulumi.StringPtrInput
// The organization unit of generated certificates
OrganizationUnit pulumi.StringArrayInput
// The organization of generated certificates
Organizations pulumi.StringArrayInput
// (Vault 1.11+ only) A block for specifying policy identifers. The `policyIdentifier` block can be repeated, and supports the following arguments:
PolicyIdentifier SecretBackendRolePolicyIdentifierArrayInput
// Specify the list of allowed policies OIDs. Use with Vault 1.10 or before. For Vault 1.11+, use `policyIdentifier` blocks instead
PolicyIdentifiers pulumi.StringArrayInput
// The postal code of generated certificates
PostalCodes pulumi.StringArrayInput
// The province of generated certificates
Provinces pulumi.StringArrayInput
// Flag to force CN usage
RequireCn pulumi.BoolPtrInput
// Flag to specify certificates for server use
ServerFlag pulumi.BoolPtrInput
// The street address of generated certificates
StreetAddresses pulumi.StringArrayInput
// The TTL, in seconds, for any certificate issued against this role.
Ttl pulumi.StringPtrInput
// Flag to use the CN in the CSR
UseCsrCommonName pulumi.BoolPtrInput
// Flag to use the SANs in the CSR
UseCsrSans pulumi.BoolPtrInput
}
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)).Elem()
}
func (i *SecretBackendRole) ToSecretBackendRoleOutput() SecretBackendRoleOutput {
return i.ToSecretBackendRoleOutputWithContext(context.Background())
}
func (i *SecretBackendRole) ToSecretBackendRoleOutputWithContext(ctx context.Context) SecretBackendRoleOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecretBackendRoleOutput)
}
// 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)).Elem()
}
func (o SecretBackendRoleOutput) ToSecretBackendRoleOutput() SecretBackendRoleOutput {
return o
}
func (o SecretBackendRoleOutput) ToSecretBackendRoleOutputWithContext(ctx context.Context) SecretBackendRoleOutput {
return o
}
// Flag to allow any name
func (o SecretBackendRoleOutput) AllowAnyName() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.AllowAnyName }).(pulumi.BoolPtrOutput)
}
// Flag to allow certificates matching the actual domain
func (o SecretBackendRoleOutput) AllowBareDomains() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.AllowBareDomains }).(pulumi.BoolPtrOutput)
}
// Flag to allow names containing glob patterns.
func (o SecretBackendRoleOutput) AllowGlobDomains() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.AllowGlobDomains }).(pulumi.BoolPtrOutput)
}
// Flag to allow IP SANs
func (o SecretBackendRoleOutput) AllowIpSans() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.AllowIpSans }).(pulumi.BoolPtrOutput)
}
// Flag to allow certificates for localhost
func (o SecretBackendRoleOutput) AllowLocalhost() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.AllowLocalhost }).(pulumi.BoolPtrOutput)
}
// Flag to allow certificates matching subdomains
func (o SecretBackendRoleOutput) AllowSubdomains() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.AllowSubdomains }).(pulumi.BoolPtrOutput)
}
// Flag to allow wildcard certificates.
func (o SecretBackendRoleOutput) AllowWildcardCertificates() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.AllowWildcardCertificates }).(pulumi.BoolPtrOutput)
}
// List of allowed domains for certificates
func (o SecretBackendRoleOutput) AllowedDomains() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.AllowedDomains }).(pulumi.StringArrayOutput)
}
// Flag, if set, `allowedDomains` can be specified using identity template expressions such as `{{identity.entity.aliases.<mount accessor>.name}}`.
func (o SecretBackendRoleOutput) AllowedDomainsTemplate() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.AllowedDomainsTemplate }).(pulumi.BoolPtrOutput)
}
// Defines allowed custom SANs
func (o SecretBackendRoleOutput) AllowedOtherSans() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.AllowedOtherSans }).(pulumi.StringArrayOutput)
}
// An array of allowed serial numbers to put in Subject
func (o SecretBackendRoleOutput) AllowedSerialNumbers() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.AllowedSerialNumbers }).(pulumi.StringArrayOutput)
}
// Defines allowed URI SANs
func (o SecretBackendRoleOutput) AllowedUriSans() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.AllowedUriSans }).(pulumi.StringArrayOutput)
}
// Flag, if set, `allowedUriSans` can be specified using identity template expressions such as `{{identity.entity.aliases.<mount accessor>.name}}`.
func (o SecretBackendRoleOutput) AllowedUriSansTemplate() pulumi.BoolOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolOutput { return v.AllowedUriSansTemplate }).(pulumi.BoolOutput)
}
// Defines allowed User IDs
func (o SecretBackendRoleOutput) AllowedUserIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.AllowedUserIds }).(pulumi.StringArrayOutput)
}
// The path the PKI secret backend is mounted at, with no leading or trailing `/`s.
func (o SecretBackendRoleOutput) Backend() pulumi.StringOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringOutput { return v.Backend }).(pulumi.StringOutput)
}
// Flag to mark basic constraints valid when issuing non-CA certificates
func (o SecretBackendRoleOutput) BasicConstraintsValidForNonCa() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.BasicConstraintsValidForNonCa }).(pulumi.BoolPtrOutput)
}
// Flag to specify certificates for client use
func (o SecretBackendRoleOutput) ClientFlag() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.ClientFlag }).(pulumi.BoolPtrOutput)
}
// Flag to specify certificates for code signing use
func (o SecretBackendRoleOutput) CodeSigningFlag() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.CodeSigningFlag }).(pulumi.BoolPtrOutput)
}
// The country of generated certificates
func (o SecretBackendRoleOutput) Countries() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.Countries }).(pulumi.StringArrayOutput)
}
// Flag to specify certificates for email protection use
func (o SecretBackendRoleOutput) EmailProtectionFlag() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.EmailProtectionFlag }).(pulumi.BoolPtrOutput)
}
// Flag to allow only valid host names
func (o SecretBackendRoleOutput) EnforceHostnames() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.EnforceHostnames }).(pulumi.BoolPtrOutput)
}
// Specify the allowed extended key usage OIDs constraint on issued certificates
func (o SecretBackendRoleOutput) ExtKeyUsageOids() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.ExtKeyUsageOids }).(pulumi.StringArrayOutput)
}
// Specify the allowed extended key usage constraint on issued certificates
func (o SecretBackendRoleOutput) ExtKeyUsages() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.ExtKeyUsages }).(pulumi.StringArrayOutput)
}
// Flag to generate leases with certificates
func (o SecretBackendRoleOutput) GenerateLease() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.GenerateLease }).(pulumi.BoolPtrOutput)
}
// Specifies the default issuer of this request. May
// be the value `default`, a name, or an issuer ID. Use ACLs to prevent access to
// the `/pki/issuer/:issuer_ref/{issue,sign}/:name` paths to prevent users
// overriding the role's `issuerRef` value.
func (o SecretBackendRoleOutput) IssuerRef() pulumi.StringOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringOutput { return v.IssuerRef }).(pulumi.StringOutput)
}
// The number of bits of generated keys
func (o SecretBackendRoleOutput) KeyBits() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.IntPtrOutput { return v.KeyBits }).(pulumi.IntPtrOutput)
}
// The generated key type, choices: `rsa`, `ec`, `ed25519`, `any`
// Defaults to `rsa`
func (o SecretBackendRoleOutput) KeyType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringPtrOutput { return v.KeyType }).(pulumi.StringPtrOutput)
}
// Specify the allowed key usage constraint on issued
// certificates. Defaults to `["DigitalSignature", "KeyAgreement", "KeyEncipherment"])`.
// To specify no default key usage constraints, set this to an empty list `[]`.
func (o SecretBackendRoleOutput) KeyUsages() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.KeyUsages }).(pulumi.StringArrayOutput)
}
// The locality of generated certificates
func (o SecretBackendRoleOutput) Localities() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.Localities }).(pulumi.StringArrayOutput)
}
// The maximum lease TTL, in seconds, for the role.
func (o SecretBackendRoleOutput) MaxTtl() pulumi.StringOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringOutput { return v.MaxTtl }).(pulumi.StringOutput)
}
// The name to identify this role within the backend. Must be unique within the backend.
func (o SecretBackendRoleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The namespace to provision the resource in.
// The value should not contain leading or trailing forward slashes.
// The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
// *Available only for Vault Enterprise*.
func (o SecretBackendRoleOutput) Namespace() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringPtrOutput { return v.Namespace }).(pulumi.StringPtrOutput)
}
// Flag to not store certificates in the storage backend
func (o SecretBackendRoleOutput) NoStore() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.NoStore }).(pulumi.BoolPtrOutput)
}
// Specifies the duration by which to backdate the NotBefore property.
func (o SecretBackendRoleOutput) NotBeforeDuration() pulumi.StringOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringOutput { return v.NotBeforeDuration }).(pulumi.StringOutput)
}
// The organization unit of generated certificates
func (o SecretBackendRoleOutput) OrganizationUnit() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.OrganizationUnit }).(pulumi.StringArrayOutput)
}
// The organization of generated certificates
func (o SecretBackendRoleOutput) Organizations() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.Organizations }).(pulumi.StringArrayOutput)
}
// (Vault 1.11+ only) A block for specifying policy identifers. The `policyIdentifier` block can be repeated, and supports the following arguments:
func (o SecretBackendRoleOutput) PolicyIdentifier() SecretBackendRolePolicyIdentifierArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) SecretBackendRolePolicyIdentifierArrayOutput { return v.PolicyIdentifier }).(SecretBackendRolePolicyIdentifierArrayOutput)
}
// Specify the list of allowed policies OIDs. Use with Vault 1.10 or before. For Vault 1.11+, use `policyIdentifier` blocks instead
func (o SecretBackendRoleOutput) PolicyIdentifiers() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.PolicyIdentifiers }).(pulumi.StringArrayOutput)
}
// The postal code of generated certificates
func (o SecretBackendRoleOutput) PostalCodes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.PostalCodes }).(pulumi.StringArrayOutput)
}
// The province of generated certificates
func (o SecretBackendRoleOutput) Provinces() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.Provinces }).(pulumi.StringArrayOutput)
}
// Flag to force CN usage
func (o SecretBackendRoleOutput) RequireCn() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.RequireCn }).(pulumi.BoolPtrOutput)
}
// Flag to specify certificates for server use
func (o SecretBackendRoleOutput) ServerFlag() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.ServerFlag }).(pulumi.BoolPtrOutput)
}
// The street address of generated certificates
func (o SecretBackendRoleOutput) StreetAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringArrayOutput { return v.StreetAddresses }).(pulumi.StringArrayOutput)
}
// The TTL, in seconds, for any certificate issued against this role.
func (o SecretBackendRoleOutput) Ttl() pulumi.StringOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.StringOutput { return v.Ttl }).(pulumi.StringOutput)
}
// Flag to use the CN in the CSR
func (o SecretBackendRoleOutput) UseCsrCommonName() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.UseCsrCommonName }).(pulumi.BoolPtrOutput)
}
// Flag to use the SANs in the CSR
func (o SecretBackendRoleOutput) UseCsrSans() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecretBackendRole) pulumi.BoolPtrOutput { return v.UseCsrSans }).(pulumi.BoolPtrOutput)
}
type SecretBackendRoleArrayOutput struct{ *pulumi.OutputState }
func (SecretBackendRoleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SecretBackendRole)(nil)).Elem()
}
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)).Elem()
}
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((*SecretBackendRoleArrayInput)(nil)).Elem(), SecretBackendRoleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SecretBackendRoleMapInput)(nil)).Elem(), SecretBackendRoleMap{})
pulumi.RegisterOutputType(SecretBackendRoleOutput{})