/
iampolicy.go
650 lines (595 loc) · 20.4 KB
/
iampolicy.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
// 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 folder
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
)
// Four different resources help you manage your IAM policy for a folder. Each of these resources serves a different use case:
//
// * `folder.IAMPolicy`: Authoritative. Sets the IAM policy for the folder and replaces any existing policy already attached.
// * `folder.IAMBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the folder are preserved.
// * `folder.IAMMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the folder are preserved.
// * `folder.IamAuditConfig`: Authoritative for a given service. Updates the IAM policy to enable audit logging for the given service.
//
// > **Note:** `folder.IAMPolicy` **cannot** be used in conjunction with `folder.IAMBinding`, `folder.IAMMember`, or `folder.IamAuditConfig` or they will fight over what your policy should be.
//
// > **Note:** `folder.IAMBinding` resources **can be** used in conjunction with `folder.IAMMember` resources **only if** they do not grant privilege to the same role.
//
// > **Note:** The underlying API method `projects.setIamPolicy` has constraints which are documented [here](https://cloud.google.com/resource-manager/reference/rest/v1/projects/setIamPolicy). In addition to these constraints,
//
// IAM Conditions cannot be used with Basic Roles such as Owner. Violating these constraints will result in the API returning a 400 error code so please review these if you encounter errors with this resource.
//
// ## google\_folder\_iam\_policy
//
// !> **Be careful!** You can accidentally lock yourself out of your folder
//
// using this resource. Deleting a `folder.IAMPolicy` removes access
// from anyone without permissions on its parent folder/organization. Proceed with caution.
// It's not recommended to use `folder.IAMPolicy` with your provider folder
// to avoid locking yourself out, and it should generally only be used with folders
// fully managed by this provider. If you do use this resource, it is recommended to **import** the policy before
// applying the change.
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/folder"
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
// Bindings: []organizations.GetIAMPolicyBinding{
// {
// Role: "roles/editor",
// Members: []string{
// "user:jane@example.com",
// },
// },
// },
// }, nil)
// if err != nil {
// return err
// }
// _, err = folder.NewIAMPolicy(ctx, "folder", &folder.IAMPolicyArgs{
// Folder: pulumi.String("folders/1234567"),
// PolicyData: *pulumi.String(admin.PolicyData),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// With IAM Conditions:
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/folder"
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
// Bindings: []organizations.GetIAMPolicyBinding{
// {
// Condition: {
// Description: pulumi.StringRef("Expiring at midnight of 2019-12-31"),
// Expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
// Title: "expires_after_2019_12_31",
// },
// Members: []string{
// "user:jane@example.com",
// },
// Role: "roles/compute.admin",
// },
// },
// }, nil)
// if err != nil {
// return err
// }
// _, err = folder.NewIAMPolicy(ctx, "folder", &folder.IAMPolicyArgs{
// Folder: pulumi.String("folders/1234567"),
// PolicyData: *pulumi.String(admin.PolicyData),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## google\_folder\_iam\_binding
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/folder"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := folder.NewIAMBinding(ctx, "folder", &folder.IAMBindingArgs{
// Folder: pulumi.String("folders/1234567"),
// Members: pulumi.StringArray{
// pulumi.String("user:jane@example.com"),
// },
// Role: pulumi.String("roles/editor"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// With IAM Conditions:
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/folder"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := folder.NewIAMBinding(ctx, "folder", &folder.IAMBindingArgs{
// Condition: &folder.IAMBindingConditionArgs{
// Description: pulumi.String("Expiring at midnight of 2019-12-31"),
// Expression: pulumi.String("request.time < timestamp(\"2020-01-01T00:00:00Z\")"),
// Title: pulumi.String("expires_after_2019_12_31"),
// },
// Folder: pulumi.String("folders/1234567"),
// Members: pulumi.StringArray{
// pulumi.String("user:jane@example.com"),
// },
// Role: pulumi.String("roles/container.admin"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## google\_folder\_iam\_member
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/folder"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := folder.NewIAMMember(ctx, "folder", &folder.IAMMemberArgs{
// Folder: pulumi.String("folders/1234567"),
// Member: pulumi.String("user:jane@example.com"),
// Role: pulumi.String("roles/editor"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// With IAM Conditions:
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/folder"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := folder.NewIAMMember(ctx, "folder", &folder.IAMMemberArgs{
// Condition: &folder.IAMMemberConditionArgs{
// Description: pulumi.String("Expiring at midnight of 2019-12-31"),
// Expression: pulumi.String("request.time < timestamp(\"2020-01-01T00:00:00Z\")"),
// Title: pulumi.String("expires_after_2019_12_31"),
// },
// Folder: pulumi.String("folders/1234567"),
// Member: pulumi.String("user:jane@example.com"),
// Role: pulumi.String("roles/firebase.admin"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## google\_folder\_iam\_audit\_config
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/folder"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := folder.NewIamAuditConfig(ctx, "folder", &folder.IamAuditConfigArgs{
// AuditLogConfigs: folder.IamAuditConfigAuditLogConfigArray{
// &folder.IamAuditConfigAuditLogConfigArgs{
// LogType: pulumi.String("ADMIN_READ"),
// },
// &folder.IamAuditConfigAuditLogConfigArgs{
// ExemptedMembers: pulumi.StringArray{
// pulumi.String("user:joebloggs@hashicorp.com"),
// },
// LogType: pulumi.String("DATA_READ"),
// },
// },
// Folder: pulumi.String("folders/1234567"),
// Service: pulumi.String("allServices"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// IAM member imports use space-delimited identifiers; the resource in question, the role, and the account.
//
// This member resource can be imported using the `folder`, role, and member e.g.
//
// ```sh
//
// $ pulumi import gcp:folder/iAMPolicy:IAMPolicy my_folder "folder roles/viewer user:foo@example.com"
//
// ```
//
// IAM binding imports use space-delimited identifiers; the resource in question and the role.
//
// This binding resource can be imported using the `folder` and role, e.g.
//
// ```sh
//
// $ pulumi import gcp:folder/iAMPolicy:IAMPolicy my_folder "folder roles/viewer"
//
// ```
//
// IAM policy imports use the identifier of the resource in question.
//
// This policy resource can be imported using the `folder`.
//
// ```sh
//
// $ pulumi import gcp:folder/iAMPolicy:IAMPolicy my_folder folder
//
// ```
//
// IAM audit config imports use the identifier of the resource in question and the service, e.g.
//
// ```sh
//
// $ pulumi import gcp:folder/iAMPolicy:IAMPolicy my_folder "folder foo.googleapis.com"
//
// ```
//
// -> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the
//
// full name of the custom role, e.g. `organizations/{{org_id}}/roles/{{role_id}}`. -> **Conditional IAM Bindings**If you're importing a IAM binding with a condition block, make sure
//
// ```sh
//
// $ pulumi import gcp:folder/iAMPolicy:IAMPolicy to include the title of condition, e.g. `google_folder_iam_binding.my_folder "folder roles/{{role_id}} condition-title"`
//
// ```
type IAMPolicy struct {
pulumi.CustomResourceState
// (Computed) The etag of the folder's IAM policy.
Etag pulumi.StringOutput `pulumi:"etag"`
// The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
Folder pulumi.StringOutput `pulumi:"folder"`
// The `organizations.getIAMPolicy` data source that represents
// the IAM policy that will be applied to the folder. The policy will be
// merged with any existing policy applied to the folder.
//
// Changing this updates the policy.
//
// Deleting this removes all policies from the folder, locking out users without
// folder-level access.
PolicyData pulumi.StringOutput `pulumi:"policyData"`
}
// NewIAMPolicy registers a new resource with the given unique name, arguments, and options.
func NewIAMPolicy(ctx *pulumi.Context,
name string, args *IAMPolicyArgs, opts ...pulumi.ResourceOption) (*IAMPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Folder == nil {
return nil, errors.New("invalid value for required argument 'Folder'")
}
if args.PolicyData == nil {
return nil, errors.New("invalid value for required argument 'PolicyData'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource IAMPolicy
err := ctx.RegisterResource("gcp:folder/iAMPolicy:IAMPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIAMPolicy gets an existing IAMPolicy 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 GetIAMPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IAMPolicyState, opts ...pulumi.ResourceOption) (*IAMPolicy, error) {
var resource IAMPolicy
err := ctx.ReadResource("gcp:folder/iAMPolicy:IAMPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IAMPolicy resources.
type iampolicyState struct {
// (Computed) The etag of the folder's IAM policy.
Etag *string `pulumi:"etag"`
// The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
Folder *string `pulumi:"folder"`
// The `organizations.getIAMPolicy` data source that represents
// the IAM policy that will be applied to the folder. The policy will be
// merged with any existing policy applied to the folder.
//
// Changing this updates the policy.
//
// Deleting this removes all policies from the folder, locking out users without
// folder-level access.
PolicyData *string `pulumi:"policyData"`
}
type IAMPolicyState struct {
// (Computed) The etag of the folder's IAM policy.
Etag pulumi.StringPtrInput
// The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
Folder pulumi.StringPtrInput
// The `organizations.getIAMPolicy` data source that represents
// the IAM policy that will be applied to the folder. The policy will be
// merged with any existing policy applied to the folder.
//
// Changing this updates the policy.
//
// Deleting this removes all policies from the folder, locking out users without
// folder-level access.
PolicyData pulumi.StringPtrInput
}
func (IAMPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*iampolicyState)(nil)).Elem()
}
type iampolicyArgs struct {
// The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
Folder string `pulumi:"folder"`
// The `organizations.getIAMPolicy` data source that represents
// the IAM policy that will be applied to the folder. The policy will be
// merged with any existing policy applied to the folder.
//
// Changing this updates the policy.
//
// Deleting this removes all policies from the folder, locking out users without
// folder-level access.
PolicyData string `pulumi:"policyData"`
}
// The set of arguments for constructing a IAMPolicy resource.
type IAMPolicyArgs struct {
// The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
Folder pulumi.StringInput
// The `organizations.getIAMPolicy` data source that represents
// the IAM policy that will be applied to the folder. The policy will be
// merged with any existing policy applied to the folder.
//
// Changing this updates the policy.
//
// Deleting this removes all policies from the folder, locking out users without
// folder-level access.
PolicyData pulumi.StringInput
}
func (IAMPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*iampolicyArgs)(nil)).Elem()
}
type IAMPolicyInput interface {
pulumi.Input
ToIAMPolicyOutput() IAMPolicyOutput
ToIAMPolicyOutputWithContext(ctx context.Context) IAMPolicyOutput
}
func (*IAMPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**IAMPolicy)(nil)).Elem()
}
func (i *IAMPolicy) ToIAMPolicyOutput() IAMPolicyOutput {
return i.ToIAMPolicyOutputWithContext(context.Background())
}
func (i *IAMPolicy) ToIAMPolicyOutputWithContext(ctx context.Context) IAMPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(IAMPolicyOutput)
}
func (i *IAMPolicy) ToOutput(ctx context.Context) pulumix.Output[*IAMPolicy] {
return pulumix.Output[*IAMPolicy]{
OutputState: i.ToIAMPolicyOutputWithContext(ctx).OutputState,
}
}
// IAMPolicyArrayInput is an input type that accepts IAMPolicyArray and IAMPolicyArrayOutput values.
// You can construct a concrete instance of `IAMPolicyArrayInput` via:
//
// IAMPolicyArray{ IAMPolicyArgs{...} }
type IAMPolicyArrayInput interface {
pulumi.Input
ToIAMPolicyArrayOutput() IAMPolicyArrayOutput
ToIAMPolicyArrayOutputWithContext(context.Context) IAMPolicyArrayOutput
}
type IAMPolicyArray []IAMPolicyInput
func (IAMPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IAMPolicy)(nil)).Elem()
}
func (i IAMPolicyArray) ToIAMPolicyArrayOutput() IAMPolicyArrayOutput {
return i.ToIAMPolicyArrayOutputWithContext(context.Background())
}
func (i IAMPolicyArray) ToIAMPolicyArrayOutputWithContext(ctx context.Context) IAMPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IAMPolicyArrayOutput)
}
func (i IAMPolicyArray) ToOutput(ctx context.Context) pulumix.Output[[]*IAMPolicy] {
return pulumix.Output[[]*IAMPolicy]{
OutputState: i.ToIAMPolicyArrayOutputWithContext(ctx).OutputState,
}
}
// IAMPolicyMapInput is an input type that accepts IAMPolicyMap and IAMPolicyMapOutput values.
// You can construct a concrete instance of `IAMPolicyMapInput` via:
//
// IAMPolicyMap{ "key": IAMPolicyArgs{...} }
type IAMPolicyMapInput interface {
pulumi.Input
ToIAMPolicyMapOutput() IAMPolicyMapOutput
ToIAMPolicyMapOutputWithContext(context.Context) IAMPolicyMapOutput
}
type IAMPolicyMap map[string]IAMPolicyInput
func (IAMPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IAMPolicy)(nil)).Elem()
}
func (i IAMPolicyMap) ToIAMPolicyMapOutput() IAMPolicyMapOutput {
return i.ToIAMPolicyMapOutputWithContext(context.Background())
}
func (i IAMPolicyMap) ToIAMPolicyMapOutputWithContext(ctx context.Context) IAMPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IAMPolicyMapOutput)
}
func (i IAMPolicyMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*IAMPolicy] {
return pulumix.Output[map[string]*IAMPolicy]{
OutputState: i.ToIAMPolicyMapOutputWithContext(ctx).OutputState,
}
}
type IAMPolicyOutput struct{ *pulumi.OutputState }
func (IAMPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IAMPolicy)(nil)).Elem()
}
func (o IAMPolicyOutput) ToIAMPolicyOutput() IAMPolicyOutput {
return o
}
func (o IAMPolicyOutput) ToIAMPolicyOutputWithContext(ctx context.Context) IAMPolicyOutput {
return o
}
func (o IAMPolicyOutput) ToOutput(ctx context.Context) pulumix.Output[*IAMPolicy] {
return pulumix.Output[*IAMPolicy]{
OutputState: o.OutputState,
}
}
// (Computed) The etag of the folder's IAM policy.
func (o IAMPolicyOutput) Etag() pulumi.StringOutput {
return o.ApplyT(func(v *IAMPolicy) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput)
}
// The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
func (o IAMPolicyOutput) Folder() pulumi.StringOutput {
return o.ApplyT(func(v *IAMPolicy) pulumi.StringOutput { return v.Folder }).(pulumi.StringOutput)
}
// The `organizations.getIAMPolicy` data source that represents
// the IAM policy that will be applied to the folder. The policy will be
// merged with any existing policy applied to the folder.
//
// Changing this updates the policy.
//
// Deleting this removes all policies from the folder, locking out users without
// folder-level access.
func (o IAMPolicyOutput) PolicyData() pulumi.StringOutput {
return o.ApplyT(func(v *IAMPolicy) pulumi.StringOutput { return v.PolicyData }).(pulumi.StringOutput)
}
type IAMPolicyArrayOutput struct{ *pulumi.OutputState }
func (IAMPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IAMPolicy)(nil)).Elem()
}
func (o IAMPolicyArrayOutput) ToIAMPolicyArrayOutput() IAMPolicyArrayOutput {
return o
}
func (o IAMPolicyArrayOutput) ToIAMPolicyArrayOutputWithContext(ctx context.Context) IAMPolicyArrayOutput {
return o
}
func (o IAMPolicyArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*IAMPolicy] {
return pulumix.Output[[]*IAMPolicy]{
OutputState: o.OutputState,
}
}
func (o IAMPolicyArrayOutput) Index(i pulumi.IntInput) IAMPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IAMPolicy {
return vs[0].([]*IAMPolicy)[vs[1].(int)]
}).(IAMPolicyOutput)
}
type IAMPolicyMapOutput struct{ *pulumi.OutputState }
func (IAMPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IAMPolicy)(nil)).Elem()
}
func (o IAMPolicyMapOutput) ToIAMPolicyMapOutput() IAMPolicyMapOutput {
return o
}
func (o IAMPolicyMapOutput) ToIAMPolicyMapOutputWithContext(ctx context.Context) IAMPolicyMapOutput {
return o
}
func (o IAMPolicyMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*IAMPolicy] {
return pulumix.Output[map[string]*IAMPolicy]{
OutputState: o.OutputState,
}
}
func (o IAMPolicyMapOutput) MapIndex(k pulumi.StringInput) IAMPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IAMPolicy {
return vs[0].(map[string]*IAMPolicy)[vs[1].(string)]
}).(IAMPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IAMPolicyInput)(nil)).Elem(), &IAMPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*IAMPolicyArrayInput)(nil)).Elem(), IAMPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IAMPolicyMapInput)(nil)).Elem(), IAMPolicyMap{})
pulumi.RegisterOutputType(IAMPolicyOutput{})
pulumi.RegisterOutputType(IAMPolicyArrayOutput{})
pulumi.RegisterOutputType(IAMPolicyMapOutput{})
}