/
randomPassword.go
470 lines (410 loc) · 23.1 KB
/
randomPassword.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
// 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 random
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-random/sdk/v4/go/random/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Identical to random_string.
//
// This resource *does* use a cryptographic random number generator.
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/rds"
// "github.com/pulumi/pulumi-random/sdk/v4/go/random"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// password, err := random.NewRandomPassword(ctx, "password", &random.RandomPasswordArgs{
// Length: pulumi.Int(16),
// Special: pulumi.Bool(true),
// OverrideSpecial: pulumi.String("!#$%&*()-_=+[]{}<>:?"),
// })
// if err != nil {
// return err
// }
// _, err = rds.NewInstance(ctx, "example", &rds.InstanceArgs{
// InstanceClass: pulumi.String(rds.InstanceType_T3_Micro),
// AllocatedStorage: pulumi.Int(64),
// Engine: pulumi.String("mysql"),
// Username: pulumi.String("someone"),
// Password: password.Result,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
//
// ## Import
//
// You can import external passwords into your Pulumi programs as follows:
type RandomPassword struct {
pulumi.CustomResourceState
// A bcrypt hash of the generated random string. **NOTE**: If the generated random string is greater than 72 bytes in length, `bcryptHash` will contain a hash of the first 72 bytes.
BcryptHash pulumi.StringOutput `pulumi:"bcryptHash"`
// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
Keepers pulumi.StringMapOutput `pulumi:"keepers"`
// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`).
Length pulumi.IntOutput `pulumi:"length"`
// Include lowercase alphabet characters in the result. Default value is `true`.
Lower pulumi.BoolOutput `pulumi:"lower"`
// Minimum number of lowercase alphabet characters in the result. Default value is `0`.
MinLower pulumi.IntOutput `pulumi:"minLower"`
// Minimum number of numeric characters in the result. Default value is `0`.
MinNumeric pulumi.IntOutput `pulumi:"minNumeric"`
// Minimum number of special characters in the result. Default value is `0`.
MinSpecial pulumi.IntOutput `pulumi:"minSpecial"`
// Minimum number of uppercase alphabet characters in the result. Default value is `0`.
MinUpper pulumi.IntOutput `pulumi:"minUpper"`
// Include numeric characters in the result. Default value is `true`. If `number`, `upper`, `lower`, and `special` are all configured, at least one of them must be set to `true`. **NOTE**: This is deprecated, use `numeric` instead.
//
// Deprecated: **NOTE**: This is deprecated, use `numeric` instead.
Number pulumi.BoolOutput `pulumi:"number"`
// Include numeric characters in the result. Default value is `true`. If `numeric`, `upper`, `lower`, and `special` are all configured, at least one of them must be set to `true`.
Numeric pulumi.BoolOutput `pulumi:"numeric"`
// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.
OverrideSpecial pulumi.StringPtrOutput `pulumi:"overrideSpecial"`
// The generated random string.
Result pulumi.StringOutput `pulumi:"result"`
// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`.
Special pulumi.BoolOutput `pulumi:"special"`
// Include uppercase alphabet characters in the result. Default value is `true`.
Upper pulumi.BoolOutput `pulumi:"upper"`
}
// NewRandomPassword registers a new resource with the given unique name, arguments, and options.
func NewRandomPassword(ctx *pulumi.Context,
name string, args *RandomPasswordArgs, opts ...pulumi.ResourceOption) (*RandomPassword, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Length == nil {
return nil, errors.New("invalid value for required argument 'Length'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"bcryptHash",
"result",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource RandomPassword
err := ctx.RegisterResource("random:index/randomPassword:RandomPassword", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRandomPassword gets an existing RandomPassword 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 GetRandomPassword(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RandomPasswordState, opts ...pulumi.ResourceOption) (*RandomPassword, error) {
var resource RandomPassword
err := ctx.ReadResource("random:index/randomPassword:RandomPassword", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RandomPassword resources.
type randomPasswordState struct {
// A bcrypt hash of the generated random string. **NOTE**: If the generated random string is greater than 72 bytes in length, `bcryptHash` will contain a hash of the first 72 bytes.
BcryptHash *string `pulumi:"bcryptHash"`
// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
Keepers map[string]string `pulumi:"keepers"`
// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`).
Length *int `pulumi:"length"`
// Include lowercase alphabet characters in the result. Default value is `true`.
Lower *bool `pulumi:"lower"`
// Minimum number of lowercase alphabet characters in the result. Default value is `0`.
MinLower *int `pulumi:"minLower"`
// Minimum number of numeric characters in the result. Default value is `0`.
MinNumeric *int `pulumi:"minNumeric"`
// Minimum number of special characters in the result. Default value is `0`.
MinSpecial *int `pulumi:"minSpecial"`
// Minimum number of uppercase alphabet characters in the result. Default value is `0`.
MinUpper *int `pulumi:"minUpper"`
// Include numeric characters in the result. Default value is `true`. If `number`, `upper`, `lower`, and `special` are all configured, at least one of them must be set to `true`. **NOTE**: This is deprecated, use `numeric` instead.
//
// Deprecated: **NOTE**: This is deprecated, use `numeric` instead.
Number *bool `pulumi:"number"`
// Include numeric characters in the result. Default value is `true`. If `numeric`, `upper`, `lower`, and `special` are all configured, at least one of them must be set to `true`.
Numeric *bool `pulumi:"numeric"`
// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.
OverrideSpecial *string `pulumi:"overrideSpecial"`
// The generated random string.
Result *string `pulumi:"result"`
// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`.
Special *bool `pulumi:"special"`
// Include uppercase alphabet characters in the result. Default value is `true`.
Upper *bool `pulumi:"upper"`
}
type RandomPasswordState struct {
// A bcrypt hash of the generated random string. **NOTE**: If the generated random string is greater than 72 bytes in length, `bcryptHash` will contain a hash of the first 72 bytes.
BcryptHash pulumi.StringPtrInput
// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
Keepers pulumi.StringMapInput
// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`).
Length pulumi.IntPtrInput
// Include lowercase alphabet characters in the result. Default value is `true`.
Lower pulumi.BoolPtrInput
// Minimum number of lowercase alphabet characters in the result. Default value is `0`.
MinLower pulumi.IntPtrInput
// Minimum number of numeric characters in the result. Default value is `0`.
MinNumeric pulumi.IntPtrInput
// Minimum number of special characters in the result. Default value is `0`.
MinSpecial pulumi.IntPtrInput
// Minimum number of uppercase alphabet characters in the result. Default value is `0`.
MinUpper pulumi.IntPtrInput
// Include numeric characters in the result. Default value is `true`. If `number`, `upper`, `lower`, and `special` are all configured, at least one of them must be set to `true`. **NOTE**: This is deprecated, use `numeric` instead.
//
// Deprecated: **NOTE**: This is deprecated, use `numeric` instead.
Number pulumi.BoolPtrInput
// Include numeric characters in the result. Default value is `true`. If `numeric`, `upper`, `lower`, and `special` are all configured, at least one of them must be set to `true`.
Numeric pulumi.BoolPtrInput
// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.
OverrideSpecial pulumi.StringPtrInput
// The generated random string.
Result pulumi.StringPtrInput
// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`.
Special pulumi.BoolPtrInput
// Include uppercase alphabet characters in the result. Default value is `true`.
Upper pulumi.BoolPtrInput
}
func (RandomPasswordState) ElementType() reflect.Type {
return reflect.TypeOf((*randomPasswordState)(nil)).Elem()
}
type randomPasswordArgs struct {
// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
Keepers map[string]string `pulumi:"keepers"`
// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`).
Length int `pulumi:"length"`
// Include lowercase alphabet characters in the result. Default value is `true`.
Lower *bool `pulumi:"lower"`
// Minimum number of lowercase alphabet characters in the result. Default value is `0`.
MinLower *int `pulumi:"minLower"`
// Minimum number of numeric characters in the result. Default value is `0`.
MinNumeric *int `pulumi:"minNumeric"`
// Minimum number of special characters in the result. Default value is `0`.
MinSpecial *int `pulumi:"minSpecial"`
// Minimum number of uppercase alphabet characters in the result. Default value is `0`.
MinUpper *int `pulumi:"minUpper"`
// Include numeric characters in the result. Default value is `true`. If `number`, `upper`, `lower`, and `special` are all configured, at least one of them must be set to `true`. **NOTE**: This is deprecated, use `numeric` instead.
//
// Deprecated: **NOTE**: This is deprecated, use `numeric` instead.
Number *bool `pulumi:"number"`
// Include numeric characters in the result. Default value is `true`. If `numeric`, `upper`, `lower`, and `special` are all configured, at least one of them must be set to `true`.
Numeric *bool `pulumi:"numeric"`
// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.
OverrideSpecial *string `pulumi:"overrideSpecial"`
// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`.
Special *bool `pulumi:"special"`
// Include uppercase alphabet characters in the result. Default value is `true`.
Upper *bool `pulumi:"upper"`
}
// The set of arguments for constructing a RandomPassword resource.
type RandomPasswordArgs struct {
// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
Keepers pulumi.StringMapInput
// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`).
Length pulumi.IntInput
// Include lowercase alphabet characters in the result. Default value is `true`.
Lower pulumi.BoolPtrInput
// Minimum number of lowercase alphabet characters in the result. Default value is `0`.
MinLower pulumi.IntPtrInput
// Minimum number of numeric characters in the result. Default value is `0`.
MinNumeric pulumi.IntPtrInput
// Minimum number of special characters in the result. Default value is `0`.
MinSpecial pulumi.IntPtrInput
// Minimum number of uppercase alphabet characters in the result. Default value is `0`.
MinUpper pulumi.IntPtrInput
// Include numeric characters in the result. Default value is `true`. If `number`, `upper`, `lower`, and `special` are all configured, at least one of them must be set to `true`. **NOTE**: This is deprecated, use `numeric` instead.
//
// Deprecated: **NOTE**: This is deprecated, use `numeric` instead.
Number pulumi.BoolPtrInput
// Include numeric characters in the result. Default value is `true`. If `numeric`, `upper`, `lower`, and `special` are all configured, at least one of them must be set to `true`.
Numeric pulumi.BoolPtrInput
// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.
OverrideSpecial pulumi.StringPtrInput
// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`.
Special pulumi.BoolPtrInput
// Include uppercase alphabet characters in the result. Default value is `true`.
Upper pulumi.BoolPtrInput
}
func (RandomPasswordArgs) ElementType() reflect.Type {
return reflect.TypeOf((*randomPasswordArgs)(nil)).Elem()
}
type RandomPasswordInput interface {
pulumi.Input
ToRandomPasswordOutput() RandomPasswordOutput
ToRandomPasswordOutputWithContext(ctx context.Context) RandomPasswordOutput
}
func (*RandomPassword) ElementType() reflect.Type {
return reflect.TypeOf((**RandomPassword)(nil)).Elem()
}
func (i *RandomPassword) ToRandomPasswordOutput() RandomPasswordOutput {
return i.ToRandomPasswordOutputWithContext(context.Background())
}
func (i *RandomPassword) ToRandomPasswordOutputWithContext(ctx context.Context) RandomPasswordOutput {
return pulumi.ToOutputWithContext(ctx, i).(RandomPasswordOutput)
}
// RandomPasswordArrayInput is an input type that accepts RandomPasswordArray and RandomPasswordArrayOutput values.
// You can construct a concrete instance of `RandomPasswordArrayInput` via:
//
// RandomPasswordArray{ RandomPasswordArgs{...} }
type RandomPasswordArrayInput interface {
pulumi.Input
ToRandomPasswordArrayOutput() RandomPasswordArrayOutput
ToRandomPasswordArrayOutputWithContext(context.Context) RandomPasswordArrayOutput
}
type RandomPasswordArray []RandomPasswordInput
func (RandomPasswordArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*RandomPassword)(nil)).Elem()
}
func (i RandomPasswordArray) ToRandomPasswordArrayOutput() RandomPasswordArrayOutput {
return i.ToRandomPasswordArrayOutputWithContext(context.Background())
}
func (i RandomPasswordArray) ToRandomPasswordArrayOutputWithContext(ctx context.Context) RandomPasswordArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RandomPasswordArrayOutput)
}
// RandomPasswordMapInput is an input type that accepts RandomPasswordMap and RandomPasswordMapOutput values.
// You can construct a concrete instance of `RandomPasswordMapInput` via:
//
// RandomPasswordMap{ "key": RandomPasswordArgs{...} }
type RandomPasswordMapInput interface {
pulumi.Input
ToRandomPasswordMapOutput() RandomPasswordMapOutput
ToRandomPasswordMapOutputWithContext(context.Context) RandomPasswordMapOutput
}
type RandomPasswordMap map[string]RandomPasswordInput
func (RandomPasswordMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*RandomPassword)(nil)).Elem()
}
func (i RandomPasswordMap) ToRandomPasswordMapOutput() RandomPasswordMapOutput {
return i.ToRandomPasswordMapOutputWithContext(context.Background())
}
func (i RandomPasswordMap) ToRandomPasswordMapOutputWithContext(ctx context.Context) RandomPasswordMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(RandomPasswordMapOutput)
}
type RandomPasswordOutput struct{ *pulumi.OutputState }
func (RandomPasswordOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RandomPassword)(nil)).Elem()
}
func (o RandomPasswordOutput) ToRandomPasswordOutput() RandomPasswordOutput {
return o
}
func (o RandomPasswordOutput) ToRandomPasswordOutputWithContext(ctx context.Context) RandomPasswordOutput {
return o
}
// A bcrypt hash of the generated random string. **NOTE**: If the generated random string is greater than 72 bytes in length, `bcryptHash` will contain a hash of the first 72 bytes.
func (o RandomPasswordOutput) BcryptHash() pulumi.StringOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.StringOutput { return v.BcryptHash }).(pulumi.StringOutput)
}
// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
func (o RandomPasswordOutput) Keepers() pulumi.StringMapOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.StringMapOutput { return v.Keepers }).(pulumi.StringMapOutput)
}
// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`).
func (o RandomPasswordOutput) Length() pulumi.IntOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.IntOutput { return v.Length }).(pulumi.IntOutput)
}
// Include lowercase alphabet characters in the result. Default value is `true`.
func (o RandomPasswordOutput) Lower() pulumi.BoolOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.BoolOutput { return v.Lower }).(pulumi.BoolOutput)
}
// Minimum number of lowercase alphabet characters in the result. Default value is `0`.
func (o RandomPasswordOutput) MinLower() pulumi.IntOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.IntOutput { return v.MinLower }).(pulumi.IntOutput)
}
// Minimum number of numeric characters in the result. Default value is `0`.
func (o RandomPasswordOutput) MinNumeric() pulumi.IntOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.IntOutput { return v.MinNumeric }).(pulumi.IntOutput)
}
// Minimum number of special characters in the result. Default value is `0`.
func (o RandomPasswordOutput) MinSpecial() pulumi.IntOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.IntOutput { return v.MinSpecial }).(pulumi.IntOutput)
}
// Minimum number of uppercase alphabet characters in the result. Default value is `0`.
func (o RandomPasswordOutput) MinUpper() pulumi.IntOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.IntOutput { return v.MinUpper }).(pulumi.IntOutput)
}
// Include numeric characters in the result. Default value is `true`. If `number`, `upper`, `lower`, and `special` are all configured, at least one of them must be set to `true`. **NOTE**: This is deprecated, use `numeric` instead.
//
// Deprecated: **NOTE**: This is deprecated, use `numeric` instead.
func (o RandomPasswordOutput) Number() pulumi.BoolOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.BoolOutput { return v.Number }).(pulumi.BoolOutput)
}
// Include numeric characters in the result. Default value is `true`. If `numeric`, `upper`, `lower`, and `special` are all configured, at least one of them must be set to `true`.
func (o RandomPasswordOutput) Numeric() pulumi.BoolOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.BoolOutput { return v.Numeric }).(pulumi.BoolOutput)
}
// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.
func (o RandomPasswordOutput) OverrideSpecial() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.StringPtrOutput { return v.OverrideSpecial }).(pulumi.StringPtrOutput)
}
// The generated random string.
func (o RandomPasswordOutput) Result() pulumi.StringOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.StringOutput { return v.Result }).(pulumi.StringOutput)
}
// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`.
func (o RandomPasswordOutput) Special() pulumi.BoolOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.BoolOutput { return v.Special }).(pulumi.BoolOutput)
}
// Include uppercase alphabet characters in the result. Default value is `true`.
func (o RandomPasswordOutput) Upper() pulumi.BoolOutput {
return o.ApplyT(func(v *RandomPassword) pulumi.BoolOutput { return v.Upper }).(pulumi.BoolOutput)
}
type RandomPasswordArrayOutput struct{ *pulumi.OutputState }
func (RandomPasswordArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*RandomPassword)(nil)).Elem()
}
func (o RandomPasswordArrayOutput) ToRandomPasswordArrayOutput() RandomPasswordArrayOutput {
return o
}
func (o RandomPasswordArrayOutput) ToRandomPasswordArrayOutputWithContext(ctx context.Context) RandomPasswordArrayOutput {
return o
}
func (o RandomPasswordArrayOutput) Index(i pulumi.IntInput) RandomPasswordOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RandomPassword {
return vs[0].([]*RandomPassword)[vs[1].(int)]
}).(RandomPasswordOutput)
}
type RandomPasswordMapOutput struct{ *pulumi.OutputState }
func (RandomPasswordMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*RandomPassword)(nil)).Elem()
}
func (o RandomPasswordMapOutput) ToRandomPasswordMapOutput() RandomPasswordMapOutput {
return o
}
func (o RandomPasswordMapOutput) ToRandomPasswordMapOutputWithContext(ctx context.Context) RandomPasswordMapOutput {
return o
}
func (o RandomPasswordMapOutput) MapIndex(k pulumi.StringInput) RandomPasswordOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RandomPassword {
return vs[0].(map[string]*RandomPassword)[vs[1].(string)]
}).(RandomPasswordOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RandomPasswordInput)(nil)).Elem(), &RandomPassword{})
pulumi.RegisterInputType(reflect.TypeOf((*RandomPasswordArrayInput)(nil)).Elem(), RandomPasswordArray{})
pulumi.RegisterInputType(reflect.TypeOf((*RandomPasswordMapInput)(nil)).Elem(), RandomPasswordMap{})
pulumi.RegisterOutputType(RandomPasswordOutput{})
pulumi.RegisterOutputType(RandomPasswordArrayOutput{})
pulumi.RegisterOutputType(RandomPasswordMapOutput{})
}