/
routerPeer.go
638 lines (577 loc) · 26.4 KB
/
routerPeer.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package compute
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// BGP information that must be configured into the routing stack to
// establish BGP peering. This information must specify the peer ASN
// and either the interface name, IP address, or peer IP address.
// Please refer to RFC4273.
//
// To get more information about RouterBgpPeer, see:
//
// * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/routers)
// * How-to Guides
// * [Google Cloud Router](https://cloud.google.com/router/docs/)
//
// ## Example Usage
// ### Router Peer Basic
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/compute"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := compute.NewRouterPeer(ctx, "peer", &compute.RouterPeerArgs{
// AdvertisedRoutePriority: pulumi.Int(100),
// Interface: pulumi.String("interface-1"),
// PeerAsn: pulumi.Int(65513),
// PeerIpAddress: pulumi.String("169.254.1.2"),
// Region: pulumi.String("us-central1"),
// Router: pulumi.String("my-router"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Router Peer Disabled
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/compute"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := compute.NewRouterPeer(ctx, "peer", &compute.RouterPeerArgs{
// AdvertisedRoutePriority: pulumi.Int(100),
// Enable: pulumi.Bool(false),
// Interface: pulumi.String("interface-1"),
// PeerAsn: pulumi.Int(65513),
// PeerIpAddress: pulumi.String("169.254.1.2"),
// Region: pulumi.String("us-central1"),
// Router: pulumi.String("my-router"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// RouterBgpPeer can be imported using any of these accepted formats
//
// ```sh
// $ pulumi import gcp:compute/routerPeer:RouterPeer default projects/{{project}}/regions/{{region}}/routers/{{router}}/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:compute/routerPeer:RouterPeer default {{project}}/{{region}}/{{router}}/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:compute/routerPeer:RouterPeer default {{region}}/{{router}}/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:compute/routerPeer:RouterPeer default {{router}}/{{name}}
// ```
type RouterPeer struct {
pulumi.CustomResourceState
// User-specified flag to indicate which mode to use for advertisement.
// Valid values of this enum field are: `DEFAULT`, `CUSTOM`
// Default value is `DEFAULT`.
// Possible values are `DEFAULT` and `CUSTOM`.
AdvertiseMode pulumi.StringPtrOutput `pulumi:"advertiseMode"`
// User-specified list of prefix groups to advertise in custom
// mode, which can take one of the following options:
// * `ALL_SUBNETS`: Advertises all available subnets, including peer VPC subnets.
// * `ALL_VPC_SUBNETS`: Advertises the router's own VPC subnets.
// * `ALL_PEER_VPC_SUBNETS`: Advertises peer subnets of the router's VPC network.
AdvertisedGroups pulumi.StringArrayOutput `pulumi:"advertisedGroups"`
// User-specified list of individual IP ranges to advertise in
// custom mode. This field can only be populated if advertiseMode
// is `CUSTOM` and is advertised to all peers of the router. These IP
// ranges will be advertised in addition to any specified groups.
// Leave this field blank to advertise no custom IP ranges.
// Structure is documented below.
AdvertisedIpRanges RouterPeerAdvertisedIpRangeArrayOutput `pulumi:"advertisedIpRanges"`
// The priority of routes advertised to this BGP peer.
// Where there is more than one matching route of maximum
// length, the routes with the lowest priority value win.
AdvertisedRoutePriority pulumi.IntPtrOutput `pulumi:"advertisedRoutePriority"`
// The status of the BGP peer connection. If set to false, any active session
// with the peer is terminated and all associated routing information is removed.
// If set to true, the peer connection can be established with routing information.
// The default is true.
Enable pulumi.BoolPtrOutput `pulumi:"enable"`
// Name of the interface the BGP peer is associated with.
Interface pulumi.StringOutput `pulumi:"interface"`
// IP address of the interface inside Google Cloud Platform.
// Only IPv4 is supported.
IpAddress pulumi.StringOutput `pulumi:"ipAddress"`
// The resource that configures and manages this BGP peer. * 'MANAGED_BY_USER' is the default value and can be managed by
// you or other users * 'MANAGED_BY_ATTACHMENT' is a BGP peer that is configured and managed by Cloud Interconnect,
// specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type
// of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
ManagementType pulumi.StringOutput `pulumi:"managementType"`
// Name of this BGP peer. The name must be 1-63 characters long,
// and comply with RFC1035. Specifically, the name must be 1-63 characters
// long and match the regular expression `a-z?` which
// means the first character must be a lowercase letter, and all
// following characters must be a dash, lowercase letter, or digit,
// except the last character, which cannot be a dash.
Name pulumi.StringOutput `pulumi:"name"`
// Peer BGP Autonomous System Number (ASN).
// Each BGP interface may use a different value.
PeerAsn pulumi.IntOutput `pulumi:"peerAsn"`
// IP address of the BGP interface outside Google Cloud Platform.
// Only IPv4 is supported.
PeerIpAddress pulumi.StringOutput `pulumi:"peerIpAddress"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringOutput `pulumi:"project"`
// Region where the router and BgpPeer reside.
// If it is not provided, the provider region is used.
Region pulumi.StringOutput `pulumi:"region"`
// The name of the Cloud Router in which this BgpPeer will be configured.
Router pulumi.StringOutput `pulumi:"router"`
}
// NewRouterPeer registers a new resource with the given unique name, arguments, and options.
func NewRouterPeer(ctx *pulumi.Context,
name string, args *RouterPeerArgs, opts ...pulumi.ResourceOption) (*RouterPeer, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Interface == nil {
return nil, errors.New("invalid value for required argument 'Interface'")
}
if args.PeerAsn == nil {
return nil, errors.New("invalid value for required argument 'PeerAsn'")
}
if args.PeerIpAddress == nil {
return nil, errors.New("invalid value for required argument 'PeerIpAddress'")
}
if args.Router == nil {
return nil, errors.New("invalid value for required argument 'Router'")
}
var resource RouterPeer
err := ctx.RegisterResource("gcp:compute/routerPeer:RouterPeer", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRouterPeer gets an existing RouterPeer 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 GetRouterPeer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RouterPeerState, opts ...pulumi.ResourceOption) (*RouterPeer, error) {
var resource RouterPeer
err := ctx.ReadResource("gcp:compute/routerPeer:RouterPeer", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RouterPeer resources.
type routerPeerState struct {
// User-specified flag to indicate which mode to use for advertisement.
// Valid values of this enum field are: `DEFAULT`, `CUSTOM`
// Default value is `DEFAULT`.
// Possible values are `DEFAULT` and `CUSTOM`.
AdvertiseMode *string `pulumi:"advertiseMode"`
// User-specified list of prefix groups to advertise in custom
// mode, which can take one of the following options:
// * `ALL_SUBNETS`: Advertises all available subnets, including peer VPC subnets.
// * `ALL_VPC_SUBNETS`: Advertises the router's own VPC subnets.
// * `ALL_PEER_VPC_SUBNETS`: Advertises peer subnets of the router's VPC network.
AdvertisedGroups []string `pulumi:"advertisedGroups"`
// User-specified list of individual IP ranges to advertise in
// custom mode. This field can only be populated if advertiseMode
// is `CUSTOM` and is advertised to all peers of the router. These IP
// ranges will be advertised in addition to any specified groups.
// Leave this field blank to advertise no custom IP ranges.
// Structure is documented below.
AdvertisedIpRanges []RouterPeerAdvertisedIpRange `pulumi:"advertisedIpRanges"`
// The priority of routes advertised to this BGP peer.
// Where there is more than one matching route of maximum
// length, the routes with the lowest priority value win.
AdvertisedRoutePriority *int `pulumi:"advertisedRoutePriority"`
// The status of the BGP peer connection. If set to false, any active session
// with the peer is terminated and all associated routing information is removed.
// If set to true, the peer connection can be established with routing information.
// The default is true.
Enable *bool `pulumi:"enable"`
// Name of the interface the BGP peer is associated with.
Interface *string `pulumi:"interface"`
// IP address of the interface inside Google Cloud Platform.
// Only IPv4 is supported.
IpAddress *string `pulumi:"ipAddress"`
// The resource that configures and manages this BGP peer. * 'MANAGED_BY_USER' is the default value and can be managed by
// you or other users * 'MANAGED_BY_ATTACHMENT' is a BGP peer that is configured and managed by Cloud Interconnect,
// specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type
// of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
ManagementType *string `pulumi:"managementType"`
// Name of this BGP peer. The name must be 1-63 characters long,
// and comply with RFC1035. Specifically, the name must be 1-63 characters
// long and match the regular expression `a-z?` which
// means the first character must be a lowercase letter, and all
// following characters must be a dash, lowercase letter, or digit,
// except the last character, which cannot be a dash.
Name *string `pulumi:"name"`
// Peer BGP Autonomous System Number (ASN).
// Each BGP interface may use a different value.
PeerAsn *int `pulumi:"peerAsn"`
// IP address of the BGP interface outside Google Cloud Platform.
// Only IPv4 is supported.
PeerIpAddress *string `pulumi:"peerIpAddress"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// Region where the router and BgpPeer reside.
// If it is not provided, the provider region is used.
Region *string `pulumi:"region"`
// The name of the Cloud Router in which this BgpPeer will be configured.
Router *string `pulumi:"router"`
}
type RouterPeerState struct {
// User-specified flag to indicate which mode to use for advertisement.
// Valid values of this enum field are: `DEFAULT`, `CUSTOM`
// Default value is `DEFAULT`.
// Possible values are `DEFAULT` and `CUSTOM`.
AdvertiseMode pulumi.StringPtrInput
// User-specified list of prefix groups to advertise in custom
// mode, which can take one of the following options:
// * `ALL_SUBNETS`: Advertises all available subnets, including peer VPC subnets.
// * `ALL_VPC_SUBNETS`: Advertises the router's own VPC subnets.
// * `ALL_PEER_VPC_SUBNETS`: Advertises peer subnets of the router's VPC network.
AdvertisedGroups pulumi.StringArrayInput
// User-specified list of individual IP ranges to advertise in
// custom mode. This field can only be populated if advertiseMode
// is `CUSTOM` and is advertised to all peers of the router. These IP
// ranges will be advertised in addition to any specified groups.
// Leave this field blank to advertise no custom IP ranges.
// Structure is documented below.
AdvertisedIpRanges RouterPeerAdvertisedIpRangeArrayInput
// The priority of routes advertised to this BGP peer.
// Where there is more than one matching route of maximum
// length, the routes with the lowest priority value win.
AdvertisedRoutePriority pulumi.IntPtrInput
// The status of the BGP peer connection. If set to false, any active session
// with the peer is terminated and all associated routing information is removed.
// If set to true, the peer connection can be established with routing information.
// The default is true.
Enable pulumi.BoolPtrInput
// Name of the interface the BGP peer is associated with.
Interface pulumi.StringPtrInput
// IP address of the interface inside Google Cloud Platform.
// Only IPv4 is supported.
IpAddress pulumi.StringPtrInput
// The resource that configures and manages this BGP peer. * 'MANAGED_BY_USER' is the default value and can be managed by
// you or other users * 'MANAGED_BY_ATTACHMENT' is a BGP peer that is configured and managed by Cloud Interconnect,
// specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type
// of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
ManagementType pulumi.StringPtrInput
// Name of this BGP peer. The name must be 1-63 characters long,
// and comply with RFC1035. Specifically, the name must be 1-63 characters
// long and match the regular expression `a-z?` which
// means the first character must be a lowercase letter, and all
// following characters must be a dash, lowercase letter, or digit,
// except the last character, which cannot be a dash.
Name pulumi.StringPtrInput
// Peer BGP Autonomous System Number (ASN).
// Each BGP interface may use a different value.
PeerAsn pulumi.IntPtrInput
// IP address of the BGP interface outside Google Cloud Platform.
// Only IPv4 is supported.
PeerIpAddress pulumi.StringPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// Region where the router and BgpPeer reside.
// If it is not provided, the provider region is used.
Region pulumi.StringPtrInput
// The name of the Cloud Router in which this BgpPeer will be configured.
Router pulumi.StringPtrInput
}
func (RouterPeerState) ElementType() reflect.Type {
return reflect.TypeOf((*routerPeerState)(nil)).Elem()
}
type routerPeerArgs struct {
// User-specified flag to indicate which mode to use for advertisement.
// Valid values of this enum field are: `DEFAULT`, `CUSTOM`
// Default value is `DEFAULT`.
// Possible values are `DEFAULT` and `CUSTOM`.
AdvertiseMode *string `pulumi:"advertiseMode"`
// User-specified list of prefix groups to advertise in custom
// mode, which can take one of the following options:
// * `ALL_SUBNETS`: Advertises all available subnets, including peer VPC subnets.
// * `ALL_VPC_SUBNETS`: Advertises the router's own VPC subnets.
// * `ALL_PEER_VPC_SUBNETS`: Advertises peer subnets of the router's VPC network.
AdvertisedGroups []string `pulumi:"advertisedGroups"`
// User-specified list of individual IP ranges to advertise in
// custom mode. This field can only be populated if advertiseMode
// is `CUSTOM` and is advertised to all peers of the router. These IP
// ranges will be advertised in addition to any specified groups.
// Leave this field blank to advertise no custom IP ranges.
// Structure is documented below.
AdvertisedIpRanges []RouterPeerAdvertisedIpRange `pulumi:"advertisedIpRanges"`
// The priority of routes advertised to this BGP peer.
// Where there is more than one matching route of maximum
// length, the routes with the lowest priority value win.
AdvertisedRoutePriority *int `pulumi:"advertisedRoutePriority"`
// The status of the BGP peer connection. If set to false, any active session
// with the peer is terminated and all associated routing information is removed.
// If set to true, the peer connection can be established with routing information.
// The default is true.
Enable *bool `pulumi:"enable"`
// Name of the interface the BGP peer is associated with.
Interface string `pulumi:"interface"`
// IP address of the interface inside Google Cloud Platform.
// Only IPv4 is supported.
IpAddress *string `pulumi:"ipAddress"`
// Name of this BGP peer. The name must be 1-63 characters long,
// and comply with RFC1035. Specifically, the name must be 1-63 characters
// long and match the regular expression `a-z?` which
// means the first character must be a lowercase letter, and all
// following characters must be a dash, lowercase letter, or digit,
// except the last character, which cannot be a dash.
Name *string `pulumi:"name"`
// Peer BGP Autonomous System Number (ASN).
// Each BGP interface may use a different value.
PeerAsn int `pulumi:"peerAsn"`
// IP address of the BGP interface outside Google Cloud Platform.
// Only IPv4 is supported.
PeerIpAddress string `pulumi:"peerIpAddress"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// Region where the router and BgpPeer reside.
// If it is not provided, the provider region is used.
Region *string `pulumi:"region"`
// The name of the Cloud Router in which this BgpPeer will be configured.
Router string `pulumi:"router"`
}
// The set of arguments for constructing a RouterPeer resource.
type RouterPeerArgs struct {
// User-specified flag to indicate which mode to use for advertisement.
// Valid values of this enum field are: `DEFAULT`, `CUSTOM`
// Default value is `DEFAULT`.
// Possible values are `DEFAULT` and `CUSTOM`.
AdvertiseMode pulumi.StringPtrInput
// User-specified list of prefix groups to advertise in custom
// mode, which can take one of the following options:
// * `ALL_SUBNETS`: Advertises all available subnets, including peer VPC subnets.
// * `ALL_VPC_SUBNETS`: Advertises the router's own VPC subnets.
// * `ALL_PEER_VPC_SUBNETS`: Advertises peer subnets of the router's VPC network.
AdvertisedGroups pulumi.StringArrayInput
// User-specified list of individual IP ranges to advertise in
// custom mode. This field can only be populated if advertiseMode
// is `CUSTOM` and is advertised to all peers of the router. These IP
// ranges will be advertised in addition to any specified groups.
// Leave this field blank to advertise no custom IP ranges.
// Structure is documented below.
AdvertisedIpRanges RouterPeerAdvertisedIpRangeArrayInput
// The priority of routes advertised to this BGP peer.
// Where there is more than one matching route of maximum
// length, the routes with the lowest priority value win.
AdvertisedRoutePriority pulumi.IntPtrInput
// The status of the BGP peer connection. If set to false, any active session
// with the peer is terminated and all associated routing information is removed.
// If set to true, the peer connection can be established with routing information.
// The default is true.
Enable pulumi.BoolPtrInput
// Name of the interface the BGP peer is associated with.
Interface pulumi.StringInput
// IP address of the interface inside Google Cloud Platform.
// Only IPv4 is supported.
IpAddress pulumi.StringPtrInput
// Name of this BGP peer. The name must be 1-63 characters long,
// and comply with RFC1035. Specifically, the name must be 1-63 characters
// long and match the regular expression `a-z?` which
// means the first character must be a lowercase letter, and all
// following characters must be a dash, lowercase letter, or digit,
// except the last character, which cannot be a dash.
Name pulumi.StringPtrInput
// Peer BGP Autonomous System Number (ASN).
// Each BGP interface may use a different value.
PeerAsn pulumi.IntInput
// IP address of the BGP interface outside Google Cloud Platform.
// Only IPv4 is supported.
PeerIpAddress pulumi.StringInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// Region where the router and BgpPeer reside.
// If it is not provided, the provider region is used.
Region pulumi.StringPtrInput
// The name of the Cloud Router in which this BgpPeer will be configured.
Router pulumi.StringInput
}
func (RouterPeerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*routerPeerArgs)(nil)).Elem()
}
type RouterPeerInput interface {
pulumi.Input
ToRouterPeerOutput() RouterPeerOutput
ToRouterPeerOutputWithContext(ctx context.Context) RouterPeerOutput
}
func (*RouterPeer) ElementType() reflect.Type {
return reflect.TypeOf((*RouterPeer)(nil))
}
func (i *RouterPeer) ToRouterPeerOutput() RouterPeerOutput {
return i.ToRouterPeerOutputWithContext(context.Background())
}
func (i *RouterPeer) ToRouterPeerOutputWithContext(ctx context.Context) RouterPeerOutput {
return pulumi.ToOutputWithContext(ctx, i).(RouterPeerOutput)
}
func (i *RouterPeer) ToRouterPeerPtrOutput() RouterPeerPtrOutput {
return i.ToRouterPeerPtrOutputWithContext(context.Background())
}
func (i *RouterPeer) ToRouterPeerPtrOutputWithContext(ctx context.Context) RouterPeerPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(RouterPeerPtrOutput)
}
type RouterPeerPtrInput interface {
pulumi.Input
ToRouterPeerPtrOutput() RouterPeerPtrOutput
ToRouterPeerPtrOutputWithContext(ctx context.Context) RouterPeerPtrOutput
}
type routerPeerPtrType RouterPeerArgs
func (*routerPeerPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**RouterPeer)(nil))
}
func (i *routerPeerPtrType) ToRouterPeerPtrOutput() RouterPeerPtrOutput {
return i.ToRouterPeerPtrOutputWithContext(context.Background())
}
func (i *routerPeerPtrType) ToRouterPeerPtrOutputWithContext(ctx context.Context) RouterPeerPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(RouterPeerPtrOutput)
}
// RouterPeerArrayInput is an input type that accepts RouterPeerArray and RouterPeerArrayOutput values.
// You can construct a concrete instance of `RouterPeerArrayInput` via:
//
// RouterPeerArray{ RouterPeerArgs{...} }
type RouterPeerArrayInput interface {
pulumi.Input
ToRouterPeerArrayOutput() RouterPeerArrayOutput
ToRouterPeerArrayOutputWithContext(context.Context) RouterPeerArrayOutput
}
type RouterPeerArray []RouterPeerInput
func (RouterPeerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*RouterPeer)(nil)).Elem()
}
func (i RouterPeerArray) ToRouterPeerArrayOutput() RouterPeerArrayOutput {
return i.ToRouterPeerArrayOutputWithContext(context.Background())
}
func (i RouterPeerArray) ToRouterPeerArrayOutputWithContext(ctx context.Context) RouterPeerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RouterPeerArrayOutput)
}
// RouterPeerMapInput is an input type that accepts RouterPeerMap and RouterPeerMapOutput values.
// You can construct a concrete instance of `RouterPeerMapInput` via:
//
// RouterPeerMap{ "key": RouterPeerArgs{...} }
type RouterPeerMapInput interface {
pulumi.Input
ToRouterPeerMapOutput() RouterPeerMapOutput
ToRouterPeerMapOutputWithContext(context.Context) RouterPeerMapOutput
}
type RouterPeerMap map[string]RouterPeerInput
func (RouterPeerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*RouterPeer)(nil)).Elem()
}
func (i RouterPeerMap) ToRouterPeerMapOutput() RouterPeerMapOutput {
return i.ToRouterPeerMapOutputWithContext(context.Background())
}
func (i RouterPeerMap) ToRouterPeerMapOutputWithContext(ctx context.Context) RouterPeerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(RouterPeerMapOutput)
}
type RouterPeerOutput struct{ *pulumi.OutputState }
func (RouterPeerOutput) ElementType() reflect.Type {
return reflect.TypeOf((*RouterPeer)(nil))
}
func (o RouterPeerOutput) ToRouterPeerOutput() RouterPeerOutput {
return o
}
func (o RouterPeerOutput) ToRouterPeerOutputWithContext(ctx context.Context) RouterPeerOutput {
return o
}
func (o RouterPeerOutput) ToRouterPeerPtrOutput() RouterPeerPtrOutput {
return o.ToRouterPeerPtrOutputWithContext(context.Background())
}
func (o RouterPeerOutput) ToRouterPeerPtrOutputWithContext(ctx context.Context) RouterPeerPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v RouterPeer) *RouterPeer {
return &v
}).(RouterPeerPtrOutput)
}
type RouterPeerPtrOutput struct{ *pulumi.OutputState }
func (RouterPeerPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RouterPeer)(nil))
}
func (o RouterPeerPtrOutput) ToRouterPeerPtrOutput() RouterPeerPtrOutput {
return o
}
func (o RouterPeerPtrOutput) ToRouterPeerPtrOutputWithContext(ctx context.Context) RouterPeerPtrOutput {
return o
}
func (o RouterPeerPtrOutput) Elem() RouterPeerOutput {
return o.ApplyT(func(v *RouterPeer) RouterPeer {
if v != nil {
return *v
}
var ret RouterPeer
return ret
}).(RouterPeerOutput)
}
type RouterPeerArrayOutput struct{ *pulumi.OutputState }
func (RouterPeerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]RouterPeer)(nil))
}
func (o RouterPeerArrayOutput) ToRouterPeerArrayOutput() RouterPeerArrayOutput {
return o
}
func (o RouterPeerArrayOutput) ToRouterPeerArrayOutputWithContext(ctx context.Context) RouterPeerArrayOutput {
return o
}
func (o RouterPeerArrayOutput) Index(i pulumi.IntInput) RouterPeerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) RouterPeer {
return vs[0].([]RouterPeer)[vs[1].(int)]
}).(RouterPeerOutput)
}
type RouterPeerMapOutput struct{ *pulumi.OutputState }
func (RouterPeerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]RouterPeer)(nil))
}
func (o RouterPeerMapOutput) ToRouterPeerMapOutput() RouterPeerMapOutput {
return o
}
func (o RouterPeerMapOutput) ToRouterPeerMapOutputWithContext(ctx context.Context) RouterPeerMapOutput {
return o
}
func (o RouterPeerMapOutput) MapIndex(k pulumi.StringInput) RouterPeerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) RouterPeer {
return vs[0].(map[string]RouterPeer)[vs[1].(string)]
}).(RouterPeerOutput)
}
func init() {
pulumi.RegisterOutputType(RouterPeerOutput{})
pulumi.RegisterOutputType(RouterPeerPtrOutput{})
pulumi.RegisterOutputType(RouterPeerArrayOutput{})
pulumi.RegisterOutputType(RouterPeerMapOutput{})
}