/
organizationSecurityPolicyRule.go
481 lines (425 loc) · 23.5 KB
/
organizationSecurityPolicyRule.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
// 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 compute
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// A rule for the OrganizationSecurityPolicy.
//
// To get more information about OrganizationSecurityPolicyRule, see:
//
// * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/organizationSecurityPolicies/addRule)
// * How-to Guides
// - [Creating firewall rules](https://cloud.google.com/vpc/docs/using-firewall-policies#create-rules)
//
// ## Example Usage
//
// ### Organization Security Policy Rule Basic
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// policy, err := compute.NewOrganizationSecurityPolicy(ctx, "policy", &compute.OrganizationSecurityPolicyArgs{
// DisplayName: pulumi.String("tf-test"),
// Parent: pulumi.String("organizations/123456789"),
// })
// if err != nil {
// return err
// }
// _, err = compute.NewOrganizationSecurityPolicyRule(ctx, "policy", &compute.OrganizationSecurityPolicyRuleArgs{
// PolicyId: policy.ID(),
// Action: pulumi.String("allow"),
// Direction: pulumi.String("INGRESS"),
// EnableLogging: pulumi.Bool(true),
// Match: &compute.OrganizationSecurityPolicyRuleMatchArgs{
// Config: &compute.OrganizationSecurityPolicyRuleMatchConfigArgs{
// SrcIpRanges: pulumi.StringArray{
// pulumi.String("192.168.0.0/16"),
// pulumi.String("10.0.0.0/8"),
// },
// Layer4Configs: compute.OrganizationSecurityPolicyRuleMatchConfigLayer4ConfigArray{
// &compute.OrganizationSecurityPolicyRuleMatchConfigLayer4ConfigArgs{
// IpProtocol: pulumi.String("tcp"),
// Ports: pulumi.StringArray{
// pulumi.String("22"),
// },
// },
// &compute.OrganizationSecurityPolicyRuleMatchConfigLayer4ConfigArgs{
// IpProtocol: pulumi.String("icmp"),
// },
// },
// },
// },
// Priority: pulumi.Int(100),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// OrganizationSecurityPolicyRule can be imported using any of these accepted formats:
//
// * `{{policy_id}}/priority/{{priority}}`
//
// When using the `pulumi import` command, OrganizationSecurityPolicyRule can be imported using one of the formats above. For example:
//
// ```sh
// $ pulumi import gcp:compute/organizationSecurityPolicyRule:OrganizationSecurityPolicyRule default {{policy_id}}/priority/{{priority}}
// ```
type OrganizationSecurityPolicyRule struct {
pulumi.CustomResourceState
// The Action to perform when the client connection triggers the rule. Can currently be either
// "allow", "deny" or "gotoNext".
Action pulumi.StringOutput `pulumi:"action"`
// A description of the rule.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The direction in which this rule applies. If unspecified an INGRESS rule is created. Possible values: ["INGRESS",
// "EGRESS"]
Direction pulumi.StringPtrOutput `pulumi:"direction"`
// Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured
// export destination in Stackdriver.
EnableLogging pulumi.BoolPtrOutput `pulumi:"enableLogging"`
// A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
// Structure is documented below.
Match OrganizationSecurityPolicyRuleMatchOutput `pulumi:"match"`
// The ID of the OrganizationSecurityPolicy this rule applies to.
PolicyId pulumi.StringOutput `pulumi:"policyId"`
// If set to true, the specified action is not enforced.
Preview pulumi.BoolPtrOutput `pulumi:"preview"`
// An integer indicating the priority of a rule in the list. The priority must be a value
// between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the
// highest priority and 2147483647 is the lowest prority.
Priority pulumi.IntOutput `pulumi:"priority"`
// A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get
// this rule. If this field is left blank, all VMs within the organization will receive the rule.
TargetResources pulumi.StringArrayOutput `pulumi:"targetResources"`
// A list of service accounts indicating the sets of instances that are applied with this rule.
TargetServiceAccounts pulumi.StringArrayOutput `pulumi:"targetServiceAccounts"`
}
// NewOrganizationSecurityPolicyRule registers a new resource with the given unique name, arguments, and options.
func NewOrganizationSecurityPolicyRule(ctx *pulumi.Context,
name string, args *OrganizationSecurityPolicyRuleArgs, opts ...pulumi.ResourceOption) (*OrganizationSecurityPolicyRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Action == nil {
return nil, errors.New("invalid value for required argument 'Action'")
}
if args.Match == nil {
return nil, errors.New("invalid value for required argument 'Match'")
}
if args.PolicyId == nil {
return nil, errors.New("invalid value for required argument 'PolicyId'")
}
if args.Priority == nil {
return nil, errors.New("invalid value for required argument 'Priority'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource OrganizationSecurityPolicyRule
err := ctx.RegisterResource("gcp:compute/organizationSecurityPolicyRule:OrganizationSecurityPolicyRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetOrganizationSecurityPolicyRule gets an existing OrganizationSecurityPolicyRule 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 GetOrganizationSecurityPolicyRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *OrganizationSecurityPolicyRuleState, opts ...pulumi.ResourceOption) (*OrganizationSecurityPolicyRule, error) {
var resource OrganizationSecurityPolicyRule
err := ctx.ReadResource("gcp:compute/organizationSecurityPolicyRule:OrganizationSecurityPolicyRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering OrganizationSecurityPolicyRule resources.
type organizationSecurityPolicyRuleState struct {
// The Action to perform when the client connection triggers the rule. Can currently be either
// "allow", "deny" or "gotoNext".
Action *string `pulumi:"action"`
// A description of the rule.
Description *string `pulumi:"description"`
// The direction in which this rule applies. If unspecified an INGRESS rule is created. Possible values: ["INGRESS",
// "EGRESS"]
Direction *string `pulumi:"direction"`
// Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured
// export destination in Stackdriver.
EnableLogging *bool `pulumi:"enableLogging"`
// A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
// Structure is documented below.
Match *OrganizationSecurityPolicyRuleMatch `pulumi:"match"`
// The ID of the OrganizationSecurityPolicy this rule applies to.
PolicyId *string `pulumi:"policyId"`
// If set to true, the specified action is not enforced.
Preview *bool `pulumi:"preview"`
// An integer indicating the priority of a rule in the list. The priority must be a value
// between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the
// highest priority and 2147483647 is the lowest prority.
Priority *int `pulumi:"priority"`
// A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get
// this rule. If this field is left blank, all VMs within the organization will receive the rule.
TargetResources []string `pulumi:"targetResources"`
// A list of service accounts indicating the sets of instances that are applied with this rule.
TargetServiceAccounts []string `pulumi:"targetServiceAccounts"`
}
type OrganizationSecurityPolicyRuleState struct {
// The Action to perform when the client connection triggers the rule. Can currently be either
// "allow", "deny" or "gotoNext".
Action pulumi.StringPtrInput
// A description of the rule.
Description pulumi.StringPtrInput
// The direction in which this rule applies. If unspecified an INGRESS rule is created. Possible values: ["INGRESS",
// "EGRESS"]
Direction pulumi.StringPtrInput
// Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured
// export destination in Stackdriver.
EnableLogging pulumi.BoolPtrInput
// A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
// Structure is documented below.
Match OrganizationSecurityPolicyRuleMatchPtrInput
// The ID of the OrganizationSecurityPolicy this rule applies to.
PolicyId pulumi.StringPtrInput
// If set to true, the specified action is not enforced.
Preview pulumi.BoolPtrInput
// An integer indicating the priority of a rule in the list. The priority must be a value
// between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the
// highest priority and 2147483647 is the lowest prority.
Priority pulumi.IntPtrInput
// A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get
// this rule. If this field is left blank, all VMs within the organization will receive the rule.
TargetResources pulumi.StringArrayInput
// A list of service accounts indicating the sets of instances that are applied with this rule.
TargetServiceAccounts pulumi.StringArrayInput
}
func (OrganizationSecurityPolicyRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*organizationSecurityPolicyRuleState)(nil)).Elem()
}
type organizationSecurityPolicyRuleArgs struct {
// The Action to perform when the client connection triggers the rule. Can currently be either
// "allow", "deny" or "gotoNext".
Action string `pulumi:"action"`
// A description of the rule.
Description *string `pulumi:"description"`
// The direction in which this rule applies. If unspecified an INGRESS rule is created. Possible values: ["INGRESS",
// "EGRESS"]
Direction *string `pulumi:"direction"`
// Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured
// export destination in Stackdriver.
EnableLogging *bool `pulumi:"enableLogging"`
// A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
// Structure is documented below.
Match OrganizationSecurityPolicyRuleMatch `pulumi:"match"`
// The ID of the OrganizationSecurityPolicy this rule applies to.
PolicyId string `pulumi:"policyId"`
// If set to true, the specified action is not enforced.
Preview *bool `pulumi:"preview"`
// An integer indicating the priority of a rule in the list. The priority must be a value
// between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the
// highest priority and 2147483647 is the lowest prority.
Priority int `pulumi:"priority"`
// A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get
// this rule. If this field is left blank, all VMs within the organization will receive the rule.
TargetResources []string `pulumi:"targetResources"`
// A list of service accounts indicating the sets of instances that are applied with this rule.
TargetServiceAccounts []string `pulumi:"targetServiceAccounts"`
}
// The set of arguments for constructing a OrganizationSecurityPolicyRule resource.
type OrganizationSecurityPolicyRuleArgs struct {
// The Action to perform when the client connection triggers the rule. Can currently be either
// "allow", "deny" or "gotoNext".
Action pulumi.StringInput
// A description of the rule.
Description pulumi.StringPtrInput
// The direction in which this rule applies. If unspecified an INGRESS rule is created. Possible values: ["INGRESS",
// "EGRESS"]
Direction pulumi.StringPtrInput
// Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured
// export destination in Stackdriver.
EnableLogging pulumi.BoolPtrInput
// A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
// Structure is documented below.
Match OrganizationSecurityPolicyRuleMatchInput
// The ID of the OrganizationSecurityPolicy this rule applies to.
PolicyId pulumi.StringInput
// If set to true, the specified action is not enforced.
Preview pulumi.BoolPtrInput
// An integer indicating the priority of a rule in the list. The priority must be a value
// between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the
// highest priority and 2147483647 is the lowest prority.
Priority pulumi.IntInput
// A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get
// this rule. If this field is left blank, all VMs within the organization will receive the rule.
TargetResources pulumi.StringArrayInput
// A list of service accounts indicating the sets of instances that are applied with this rule.
TargetServiceAccounts pulumi.StringArrayInput
}
func (OrganizationSecurityPolicyRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*organizationSecurityPolicyRuleArgs)(nil)).Elem()
}
type OrganizationSecurityPolicyRuleInput interface {
pulumi.Input
ToOrganizationSecurityPolicyRuleOutput() OrganizationSecurityPolicyRuleOutput
ToOrganizationSecurityPolicyRuleOutputWithContext(ctx context.Context) OrganizationSecurityPolicyRuleOutput
}
func (*OrganizationSecurityPolicyRule) ElementType() reflect.Type {
return reflect.TypeOf((**OrganizationSecurityPolicyRule)(nil)).Elem()
}
func (i *OrganizationSecurityPolicyRule) ToOrganizationSecurityPolicyRuleOutput() OrganizationSecurityPolicyRuleOutput {
return i.ToOrganizationSecurityPolicyRuleOutputWithContext(context.Background())
}
func (i *OrganizationSecurityPolicyRule) ToOrganizationSecurityPolicyRuleOutputWithContext(ctx context.Context) OrganizationSecurityPolicyRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(OrganizationSecurityPolicyRuleOutput)
}
// OrganizationSecurityPolicyRuleArrayInput is an input type that accepts OrganizationSecurityPolicyRuleArray and OrganizationSecurityPolicyRuleArrayOutput values.
// You can construct a concrete instance of `OrganizationSecurityPolicyRuleArrayInput` via:
//
// OrganizationSecurityPolicyRuleArray{ OrganizationSecurityPolicyRuleArgs{...} }
type OrganizationSecurityPolicyRuleArrayInput interface {
pulumi.Input
ToOrganizationSecurityPolicyRuleArrayOutput() OrganizationSecurityPolicyRuleArrayOutput
ToOrganizationSecurityPolicyRuleArrayOutputWithContext(context.Context) OrganizationSecurityPolicyRuleArrayOutput
}
type OrganizationSecurityPolicyRuleArray []OrganizationSecurityPolicyRuleInput
func (OrganizationSecurityPolicyRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*OrganizationSecurityPolicyRule)(nil)).Elem()
}
func (i OrganizationSecurityPolicyRuleArray) ToOrganizationSecurityPolicyRuleArrayOutput() OrganizationSecurityPolicyRuleArrayOutput {
return i.ToOrganizationSecurityPolicyRuleArrayOutputWithContext(context.Background())
}
func (i OrganizationSecurityPolicyRuleArray) ToOrganizationSecurityPolicyRuleArrayOutputWithContext(ctx context.Context) OrganizationSecurityPolicyRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(OrganizationSecurityPolicyRuleArrayOutput)
}
// OrganizationSecurityPolicyRuleMapInput is an input type that accepts OrganizationSecurityPolicyRuleMap and OrganizationSecurityPolicyRuleMapOutput values.
// You can construct a concrete instance of `OrganizationSecurityPolicyRuleMapInput` via:
//
// OrganizationSecurityPolicyRuleMap{ "key": OrganizationSecurityPolicyRuleArgs{...} }
type OrganizationSecurityPolicyRuleMapInput interface {
pulumi.Input
ToOrganizationSecurityPolicyRuleMapOutput() OrganizationSecurityPolicyRuleMapOutput
ToOrganizationSecurityPolicyRuleMapOutputWithContext(context.Context) OrganizationSecurityPolicyRuleMapOutput
}
type OrganizationSecurityPolicyRuleMap map[string]OrganizationSecurityPolicyRuleInput
func (OrganizationSecurityPolicyRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*OrganizationSecurityPolicyRule)(nil)).Elem()
}
func (i OrganizationSecurityPolicyRuleMap) ToOrganizationSecurityPolicyRuleMapOutput() OrganizationSecurityPolicyRuleMapOutput {
return i.ToOrganizationSecurityPolicyRuleMapOutputWithContext(context.Background())
}
func (i OrganizationSecurityPolicyRuleMap) ToOrganizationSecurityPolicyRuleMapOutputWithContext(ctx context.Context) OrganizationSecurityPolicyRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(OrganizationSecurityPolicyRuleMapOutput)
}
type OrganizationSecurityPolicyRuleOutput struct{ *pulumi.OutputState }
func (OrganizationSecurityPolicyRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**OrganizationSecurityPolicyRule)(nil)).Elem()
}
func (o OrganizationSecurityPolicyRuleOutput) ToOrganizationSecurityPolicyRuleOutput() OrganizationSecurityPolicyRuleOutput {
return o
}
func (o OrganizationSecurityPolicyRuleOutput) ToOrganizationSecurityPolicyRuleOutputWithContext(ctx context.Context) OrganizationSecurityPolicyRuleOutput {
return o
}
// The Action to perform when the client connection triggers the rule. Can currently be either
// "allow", "deny" or "gotoNext".
func (o OrganizationSecurityPolicyRuleOutput) Action() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationSecurityPolicyRule) pulumi.StringOutput { return v.Action }).(pulumi.StringOutput)
}
// A description of the rule.
func (o OrganizationSecurityPolicyRuleOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *OrganizationSecurityPolicyRule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The direction in which this rule applies. If unspecified an INGRESS rule is created. Possible values: ["INGRESS",
// "EGRESS"]
func (o OrganizationSecurityPolicyRuleOutput) Direction() pulumi.StringPtrOutput {
return o.ApplyT(func(v *OrganizationSecurityPolicyRule) pulumi.StringPtrOutput { return v.Direction }).(pulumi.StringPtrOutput)
}
// Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured
// export destination in Stackdriver.
func (o OrganizationSecurityPolicyRuleOutput) EnableLogging() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *OrganizationSecurityPolicyRule) pulumi.BoolPtrOutput { return v.EnableLogging }).(pulumi.BoolPtrOutput)
}
// A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
// Structure is documented below.
func (o OrganizationSecurityPolicyRuleOutput) Match() OrganizationSecurityPolicyRuleMatchOutput {
return o.ApplyT(func(v *OrganizationSecurityPolicyRule) OrganizationSecurityPolicyRuleMatchOutput { return v.Match }).(OrganizationSecurityPolicyRuleMatchOutput)
}
// The ID of the OrganizationSecurityPolicy this rule applies to.
func (o OrganizationSecurityPolicyRuleOutput) PolicyId() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationSecurityPolicyRule) pulumi.StringOutput { return v.PolicyId }).(pulumi.StringOutput)
}
// If set to true, the specified action is not enforced.
func (o OrganizationSecurityPolicyRuleOutput) Preview() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *OrganizationSecurityPolicyRule) pulumi.BoolPtrOutput { return v.Preview }).(pulumi.BoolPtrOutput)
}
// An integer indicating the priority of a rule in the list. The priority must be a value
// between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the
// highest priority and 2147483647 is the lowest prority.
func (o OrganizationSecurityPolicyRuleOutput) Priority() pulumi.IntOutput {
return o.ApplyT(func(v *OrganizationSecurityPolicyRule) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput)
}
// A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get
// this rule. If this field is left blank, all VMs within the organization will receive the rule.
func (o OrganizationSecurityPolicyRuleOutput) TargetResources() pulumi.StringArrayOutput {
return o.ApplyT(func(v *OrganizationSecurityPolicyRule) pulumi.StringArrayOutput { return v.TargetResources }).(pulumi.StringArrayOutput)
}
// A list of service accounts indicating the sets of instances that are applied with this rule.
func (o OrganizationSecurityPolicyRuleOutput) TargetServiceAccounts() pulumi.StringArrayOutput {
return o.ApplyT(func(v *OrganizationSecurityPolicyRule) pulumi.StringArrayOutput { return v.TargetServiceAccounts }).(pulumi.StringArrayOutput)
}
type OrganizationSecurityPolicyRuleArrayOutput struct{ *pulumi.OutputState }
func (OrganizationSecurityPolicyRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*OrganizationSecurityPolicyRule)(nil)).Elem()
}
func (o OrganizationSecurityPolicyRuleArrayOutput) ToOrganizationSecurityPolicyRuleArrayOutput() OrganizationSecurityPolicyRuleArrayOutput {
return o
}
func (o OrganizationSecurityPolicyRuleArrayOutput) ToOrganizationSecurityPolicyRuleArrayOutputWithContext(ctx context.Context) OrganizationSecurityPolicyRuleArrayOutput {
return o
}
func (o OrganizationSecurityPolicyRuleArrayOutput) Index(i pulumi.IntInput) OrganizationSecurityPolicyRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OrganizationSecurityPolicyRule {
return vs[0].([]*OrganizationSecurityPolicyRule)[vs[1].(int)]
}).(OrganizationSecurityPolicyRuleOutput)
}
type OrganizationSecurityPolicyRuleMapOutput struct{ *pulumi.OutputState }
func (OrganizationSecurityPolicyRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*OrganizationSecurityPolicyRule)(nil)).Elem()
}
func (o OrganizationSecurityPolicyRuleMapOutput) ToOrganizationSecurityPolicyRuleMapOutput() OrganizationSecurityPolicyRuleMapOutput {
return o
}
func (o OrganizationSecurityPolicyRuleMapOutput) ToOrganizationSecurityPolicyRuleMapOutputWithContext(ctx context.Context) OrganizationSecurityPolicyRuleMapOutput {
return o
}
func (o OrganizationSecurityPolicyRuleMapOutput) MapIndex(k pulumi.StringInput) OrganizationSecurityPolicyRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OrganizationSecurityPolicyRule {
return vs[0].(map[string]*OrganizationSecurityPolicyRule)[vs[1].(string)]
}).(OrganizationSecurityPolicyRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*OrganizationSecurityPolicyRuleInput)(nil)).Elem(), &OrganizationSecurityPolicyRule{})
pulumi.RegisterInputType(reflect.TypeOf((*OrganizationSecurityPolicyRuleArrayInput)(nil)).Elem(), OrganizationSecurityPolicyRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*OrganizationSecurityPolicyRuleMapInput)(nil)).Elem(), OrganizationSecurityPolicyRuleMap{})
pulumi.RegisterOutputType(OrganizationSecurityPolicyRuleOutput{})
pulumi.RegisterOutputType(OrganizationSecurityPolicyRuleArrayOutput{})
pulumi.RegisterOutputType(OrganizationSecurityPolicyRuleMapOutput{})
}