/
connectionIAMMember.go
561 lines (502 loc) · 27.7 KB
/
connectionIAMMember.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
// 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 cloudbuildv2
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"
)
// Three different resources help you manage your IAM policy for Cloud Build v2 Connection. Each of these resources serves a different use case:
//
// * `cloudbuildv2.ConnectionIAMPolicy`: Authoritative. Sets the IAM policy for the connection and replaces any existing policy already attached.
// * `cloudbuildv2.ConnectionIAMBinding`: 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 connection are preserved.
// * `cloudbuildv2.ConnectionIAMMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the connection are preserved.
//
// # A data source can be used to retrieve policy data in advent you do not need creation
//
// * `cloudbuildv2.ConnectionIAMPolicy`: Retrieves the IAM policy for the connection
//
// > **Note:** `cloudbuildv2.ConnectionIAMPolicy` **cannot** be used in conjunction with `cloudbuildv2.ConnectionIAMBinding` and `cloudbuildv2.ConnectionIAMMember` or they will fight over what your policy should be.
//
// > **Note:** `cloudbuildv2.ConnectionIAMBinding` resources **can be** used in conjunction with `cloudbuildv2.ConnectionIAMMember` resources **only if** they do not grant privilege to the same role.
//
// ## google\_cloudbuildv2\_connection\_iam\_policy
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/cloudbuildv2"
// "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/cloudbuild.connectionViewer",
// Members: []string{
// "user:jane@example.com",
// },
// },
// },
// }, nil)
// if err != nil {
// return err
// }
// _, err = cloudbuildv2.NewConnectionIAMPolicy(ctx, "policy", &cloudbuildv2.ConnectionIAMPolicyArgs{
// Project: pulumi.Any(google_cloudbuildv2_connection.MyConnection.Project),
// Location: pulumi.Any(google_cloudbuildv2_connection.MyConnection.Location),
// PolicyData: *pulumi.String(admin.PolicyData),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## google\_cloudbuildv2\_connection\_iam\_binding
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/cloudbuildv2"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := cloudbuildv2.NewConnectionIAMBinding(ctx, "binding", &cloudbuildv2.ConnectionIAMBindingArgs{
// Project: pulumi.Any(google_cloudbuildv2_connection.MyConnection.Project),
// Location: pulumi.Any(google_cloudbuildv2_connection.MyConnection.Location),
// Role: pulumi.String("roles/cloudbuild.connectionViewer"),
// Members: pulumi.StringArray{
// pulumi.String("user:jane@example.com"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## google\_cloudbuildv2\_connection\_iam\_member
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/cloudbuildv2"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := cloudbuildv2.NewConnectionIAMMember(ctx, "member", &cloudbuildv2.ConnectionIAMMemberArgs{
// Project: pulumi.Any(google_cloudbuildv2_connection.MyConnection.Project),
// Location: pulumi.Any(google_cloudbuildv2_connection.MyConnection.Location),
// Role: pulumi.String("roles/cloudbuild.connectionViewer"),
// Member: pulumi.String("user:jane@example.com"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// For all import syntaxes, the "resource in question" can take any of the following forms* projects/{{project}}/locations/{{location}}/connections/{{name}} * {{project}}/{{location}}/{{name}} * {{location}}/{{name}} * {{name}} Any variables not passed in the import command will be taken from the provider configuration. Cloud Build v2 connection IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.
//
// ```sh
//
// $ pulumi import gcp:cloudbuildv2/connectionIAMMember:ConnectionIAMMember editor "projects/{{project}}/locations/{{location}}/connections/{{connection}} roles/cloudbuild.connectionViewer user:jane@example.com"
//
// ```
//
// IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.
//
// ```sh
//
// $ pulumi import gcp:cloudbuildv2/connectionIAMMember:ConnectionIAMMember editor "projects/{{project}}/locations/{{location}}/connections/{{connection}} roles/cloudbuild.connectionViewer"
//
// ```
//
// IAM policy imports use the identifier of the resource in question, e.g.
//
// ```sh
//
// $ pulumi import gcp:cloudbuildv2/connectionIAMMember:ConnectionIAMMember editor projects/{{project}}/locations/{{location}}/connections/{{connection}}
//
// ```
//
// -> **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. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.
type ConnectionIAMMember struct {
pulumi.CustomResourceState
Condition ConnectionIAMMemberConditionPtrOutput `pulumi:"condition"`
// (Computed) The etag of the IAM policy.
Etag pulumi.StringOutput `pulumi:"etag"`
Location pulumi.StringOutput `pulumi:"location"`
Member pulumi.StringOutput `pulumi:"member"`
// Used to find the parent resource to bind the IAM policy to
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the project in which the resource belongs.
// If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
//
// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
// Each entry can have one of the following values:
// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
Project pulumi.StringOutput `pulumi:"project"`
// The role that should be applied. Only one
// `cloudbuildv2.ConnectionIAMBinding` can be used per role. Note that custom roles must be of the format
// `[projects|organizations]/{parent-name}/roles/{role-name}`.
Role pulumi.StringOutput `pulumi:"role"`
}
// NewConnectionIAMMember registers a new resource with the given unique name, arguments, and options.
func NewConnectionIAMMember(ctx *pulumi.Context,
name string, args *ConnectionIAMMemberArgs, opts ...pulumi.ResourceOption) (*ConnectionIAMMember, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Member == nil {
return nil, errors.New("invalid value for required argument 'Member'")
}
if args.Role == nil {
return nil, errors.New("invalid value for required argument 'Role'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ConnectionIAMMember
err := ctx.RegisterResource("gcp:cloudbuildv2/connectionIAMMember:ConnectionIAMMember", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConnectionIAMMember gets an existing ConnectionIAMMember 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 GetConnectionIAMMember(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConnectionIAMMemberState, opts ...pulumi.ResourceOption) (*ConnectionIAMMember, error) {
var resource ConnectionIAMMember
err := ctx.ReadResource("gcp:cloudbuildv2/connectionIAMMember:ConnectionIAMMember", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ConnectionIAMMember resources.
type connectionIAMMemberState struct {
Condition *ConnectionIAMMemberCondition `pulumi:"condition"`
// (Computed) The etag of the IAM policy.
Etag *string `pulumi:"etag"`
Location *string `pulumi:"location"`
Member *string `pulumi:"member"`
// Used to find the parent resource to bind the IAM policy to
Name *string `pulumi:"name"`
// The ID of the project in which the resource belongs.
// If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
//
// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
// Each entry can have one of the following values:
// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
Project *string `pulumi:"project"`
// The role that should be applied. Only one
// `cloudbuildv2.ConnectionIAMBinding` can be used per role. Note that custom roles must be of the format
// `[projects|organizations]/{parent-name}/roles/{role-name}`.
Role *string `pulumi:"role"`
}
type ConnectionIAMMemberState struct {
Condition ConnectionIAMMemberConditionPtrInput
// (Computed) The etag of the IAM policy.
Etag pulumi.StringPtrInput
Location pulumi.StringPtrInput
Member pulumi.StringPtrInput
// Used to find the parent resource to bind the IAM policy to
Name pulumi.StringPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
//
// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
// Each entry can have one of the following values:
// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
Project pulumi.StringPtrInput
// The role that should be applied. Only one
// `cloudbuildv2.ConnectionIAMBinding` can be used per role. Note that custom roles must be of the format
// `[projects|organizations]/{parent-name}/roles/{role-name}`.
Role pulumi.StringPtrInput
}
func (ConnectionIAMMemberState) ElementType() reflect.Type {
return reflect.TypeOf((*connectionIAMMemberState)(nil)).Elem()
}
type connectionIAMMemberArgs struct {
Condition *ConnectionIAMMemberCondition `pulumi:"condition"`
Location *string `pulumi:"location"`
Member string `pulumi:"member"`
// Used to find the parent resource to bind the IAM policy to
Name *string `pulumi:"name"`
// The ID of the project in which the resource belongs.
// If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
//
// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
// Each entry can have one of the following values:
// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
Project *string `pulumi:"project"`
// The role that should be applied. Only one
// `cloudbuildv2.ConnectionIAMBinding` can be used per role. Note that custom roles must be of the format
// `[projects|organizations]/{parent-name}/roles/{role-name}`.
Role string `pulumi:"role"`
}
// The set of arguments for constructing a ConnectionIAMMember resource.
type ConnectionIAMMemberArgs struct {
Condition ConnectionIAMMemberConditionPtrInput
Location pulumi.StringPtrInput
Member pulumi.StringInput
// Used to find the parent resource to bind the IAM policy to
Name pulumi.StringPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
//
// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
// Each entry can have one of the following values:
// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
Project pulumi.StringPtrInput
// The role that should be applied. Only one
// `cloudbuildv2.ConnectionIAMBinding` can be used per role. Note that custom roles must be of the format
// `[projects|organizations]/{parent-name}/roles/{role-name}`.
Role pulumi.StringInput
}
func (ConnectionIAMMemberArgs) ElementType() reflect.Type {
return reflect.TypeOf((*connectionIAMMemberArgs)(nil)).Elem()
}
type ConnectionIAMMemberInput interface {
pulumi.Input
ToConnectionIAMMemberOutput() ConnectionIAMMemberOutput
ToConnectionIAMMemberOutputWithContext(ctx context.Context) ConnectionIAMMemberOutput
}
func (*ConnectionIAMMember) ElementType() reflect.Type {
return reflect.TypeOf((**ConnectionIAMMember)(nil)).Elem()
}
func (i *ConnectionIAMMember) ToConnectionIAMMemberOutput() ConnectionIAMMemberOutput {
return i.ToConnectionIAMMemberOutputWithContext(context.Background())
}
func (i *ConnectionIAMMember) ToConnectionIAMMemberOutputWithContext(ctx context.Context) ConnectionIAMMemberOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionIAMMemberOutput)
}
func (i *ConnectionIAMMember) ToOutput(ctx context.Context) pulumix.Output[*ConnectionIAMMember] {
return pulumix.Output[*ConnectionIAMMember]{
OutputState: i.ToConnectionIAMMemberOutputWithContext(ctx).OutputState,
}
}
// ConnectionIAMMemberArrayInput is an input type that accepts ConnectionIAMMemberArray and ConnectionIAMMemberArrayOutput values.
// You can construct a concrete instance of `ConnectionIAMMemberArrayInput` via:
//
// ConnectionIAMMemberArray{ ConnectionIAMMemberArgs{...} }
type ConnectionIAMMemberArrayInput interface {
pulumi.Input
ToConnectionIAMMemberArrayOutput() ConnectionIAMMemberArrayOutput
ToConnectionIAMMemberArrayOutputWithContext(context.Context) ConnectionIAMMemberArrayOutput
}
type ConnectionIAMMemberArray []ConnectionIAMMemberInput
func (ConnectionIAMMemberArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ConnectionIAMMember)(nil)).Elem()
}
func (i ConnectionIAMMemberArray) ToConnectionIAMMemberArrayOutput() ConnectionIAMMemberArrayOutput {
return i.ToConnectionIAMMemberArrayOutputWithContext(context.Background())
}
func (i ConnectionIAMMemberArray) ToConnectionIAMMemberArrayOutputWithContext(ctx context.Context) ConnectionIAMMemberArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionIAMMemberArrayOutput)
}
func (i ConnectionIAMMemberArray) ToOutput(ctx context.Context) pulumix.Output[[]*ConnectionIAMMember] {
return pulumix.Output[[]*ConnectionIAMMember]{
OutputState: i.ToConnectionIAMMemberArrayOutputWithContext(ctx).OutputState,
}
}
// ConnectionIAMMemberMapInput is an input type that accepts ConnectionIAMMemberMap and ConnectionIAMMemberMapOutput values.
// You can construct a concrete instance of `ConnectionIAMMemberMapInput` via:
//
// ConnectionIAMMemberMap{ "key": ConnectionIAMMemberArgs{...} }
type ConnectionIAMMemberMapInput interface {
pulumi.Input
ToConnectionIAMMemberMapOutput() ConnectionIAMMemberMapOutput
ToConnectionIAMMemberMapOutputWithContext(context.Context) ConnectionIAMMemberMapOutput
}
type ConnectionIAMMemberMap map[string]ConnectionIAMMemberInput
func (ConnectionIAMMemberMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ConnectionIAMMember)(nil)).Elem()
}
func (i ConnectionIAMMemberMap) ToConnectionIAMMemberMapOutput() ConnectionIAMMemberMapOutput {
return i.ToConnectionIAMMemberMapOutputWithContext(context.Background())
}
func (i ConnectionIAMMemberMap) ToConnectionIAMMemberMapOutputWithContext(ctx context.Context) ConnectionIAMMemberMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionIAMMemberMapOutput)
}
func (i ConnectionIAMMemberMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*ConnectionIAMMember] {
return pulumix.Output[map[string]*ConnectionIAMMember]{
OutputState: i.ToConnectionIAMMemberMapOutputWithContext(ctx).OutputState,
}
}
type ConnectionIAMMemberOutput struct{ *pulumi.OutputState }
func (ConnectionIAMMemberOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ConnectionIAMMember)(nil)).Elem()
}
func (o ConnectionIAMMemberOutput) ToConnectionIAMMemberOutput() ConnectionIAMMemberOutput {
return o
}
func (o ConnectionIAMMemberOutput) ToConnectionIAMMemberOutputWithContext(ctx context.Context) ConnectionIAMMemberOutput {
return o
}
func (o ConnectionIAMMemberOutput) ToOutput(ctx context.Context) pulumix.Output[*ConnectionIAMMember] {
return pulumix.Output[*ConnectionIAMMember]{
OutputState: o.OutputState,
}
}
func (o ConnectionIAMMemberOutput) Condition() ConnectionIAMMemberConditionPtrOutput {
return o.ApplyT(func(v *ConnectionIAMMember) ConnectionIAMMemberConditionPtrOutput { return v.Condition }).(ConnectionIAMMemberConditionPtrOutput)
}
// (Computed) The etag of the IAM policy.
func (o ConnectionIAMMemberOutput) Etag() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionIAMMember) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput)
}
func (o ConnectionIAMMemberOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionIAMMember) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
func (o ConnectionIAMMemberOutput) Member() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionIAMMember) pulumi.StringOutput { return v.Member }).(pulumi.StringOutput)
}
// Used to find the parent resource to bind the IAM policy to
func (o ConnectionIAMMemberOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionIAMMember) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the project in which the resource belongs.
// If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
//
// - `member/members` - (Required) Identities that will be granted the privilege in `role`.
// Each entry can have one of the following values:
// - **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
// - **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
// - **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
// - **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
// - **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
// - **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
// - **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
// - **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
// - **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
func (o ConnectionIAMMemberOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionIAMMember) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// The role that should be applied. Only one
// `cloudbuildv2.ConnectionIAMBinding` can be used per role. Note that custom roles must be of the format
// `[projects|organizations]/{parent-name}/roles/{role-name}`.
func (o ConnectionIAMMemberOutput) Role() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionIAMMember) pulumi.StringOutput { return v.Role }).(pulumi.StringOutput)
}
type ConnectionIAMMemberArrayOutput struct{ *pulumi.OutputState }
func (ConnectionIAMMemberArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ConnectionIAMMember)(nil)).Elem()
}
func (o ConnectionIAMMemberArrayOutput) ToConnectionIAMMemberArrayOutput() ConnectionIAMMemberArrayOutput {
return o
}
func (o ConnectionIAMMemberArrayOutput) ToConnectionIAMMemberArrayOutputWithContext(ctx context.Context) ConnectionIAMMemberArrayOutput {
return o
}
func (o ConnectionIAMMemberArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*ConnectionIAMMember] {
return pulumix.Output[[]*ConnectionIAMMember]{
OutputState: o.OutputState,
}
}
func (o ConnectionIAMMemberArrayOutput) Index(i pulumi.IntInput) ConnectionIAMMemberOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConnectionIAMMember {
return vs[0].([]*ConnectionIAMMember)[vs[1].(int)]
}).(ConnectionIAMMemberOutput)
}
type ConnectionIAMMemberMapOutput struct{ *pulumi.OutputState }
func (ConnectionIAMMemberMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ConnectionIAMMember)(nil)).Elem()
}
func (o ConnectionIAMMemberMapOutput) ToConnectionIAMMemberMapOutput() ConnectionIAMMemberMapOutput {
return o
}
func (o ConnectionIAMMemberMapOutput) ToConnectionIAMMemberMapOutputWithContext(ctx context.Context) ConnectionIAMMemberMapOutput {
return o
}
func (o ConnectionIAMMemberMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*ConnectionIAMMember] {
return pulumix.Output[map[string]*ConnectionIAMMember]{
OutputState: o.OutputState,
}
}
func (o ConnectionIAMMemberMapOutput) MapIndex(k pulumi.StringInput) ConnectionIAMMemberOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConnectionIAMMember {
return vs[0].(map[string]*ConnectionIAMMember)[vs[1].(string)]
}).(ConnectionIAMMemberOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionIAMMemberInput)(nil)).Elem(), &ConnectionIAMMember{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionIAMMemberArrayInput)(nil)).Elem(), ConnectionIAMMemberArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionIAMMemberMapInput)(nil)).Elem(), ConnectionIAMMemberMap{})
pulumi.RegisterOutputType(ConnectionIAMMemberOutput{})
pulumi.RegisterOutputType(ConnectionIAMMemberArrayOutput{})
pulumi.RegisterOutputType(ConnectionIAMMemberMapOutput{})
}