/
interconnectAttachment.go
891 lines (830 loc) · 44.8 KB
/
interconnectAttachment.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
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
// *** 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"
)
// Represents an InterconnectAttachment (VLAN attachment) resource. For more
// information, see Creating VLAN Attachments.
//
// ## Example Usage
// ### Interconnect Attachment 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 {
// foobarNetwork, err := compute.NewNetwork(ctx, "foobarNetwork", &compute.NetworkArgs{
// AutoCreateSubnetworks: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// foobarRouter, err := compute.NewRouter(ctx, "foobarRouter", &compute.RouterArgs{
// Network: foobarNetwork.Name,
// Bgp: &compute.RouterBgpArgs{
// Asn: pulumi.Int(16550),
// },
// })
// if err != nil {
// return err
// }
// _, err = compute.NewInterconnectAttachment(ctx, "onPrem", &compute.InterconnectAttachmentArgs{
// EdgeAvailabilityDomain: pulumi.String("AVAILABILITY_DOMAIN_1"),
// Type: pulumi.String("PARTNER"),
// Router: foobarRouter.ID(),
// Mtu: pulumi.String("1500"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Compute Interconnect Attachment Ipsec Encryption
//
// ```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 {
// network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
// AutoCreateSubnetworks: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// address, err := compute.NewAddress(ctx, "address", &compute.AddressArgs{
// AddressType: pulumi.String("INTERNAL"),
// Purpose: pulumi.String("IPSEC_INTERCONNECT"),
// Address: pulumi.String("192.168.1.0"),
// PrefixLength: pulumi.Int(29),
// Network: network.SelfLink,
// })
// if err != nil {
// return err
// }
// router, err := compute.NewRouter(ctx, "router", &compute.RouterArgs{
// Network: network.Name,
// EncryptedInterconnectRouter: pulumi.Bool(true),
// Bgp: &compute.RouterBgpArgs{
// Asn: pulumi.Int(16550),
// },
// })
// if err != nil {
// return err
// }
// _, err = compute.NewInterconnectAttachment(ctx, "ipsec_encrypted_interconnect_attachment", &compute.InterconnectAttachmentArgs{
// EdgeAvailabilityDomain: pulumi.String("AVAILABILITY_DOMAIN_1"),
// Type: pulumi.String("PARTNER"),
// Router: router.ID(),
// Encryption: pulumi.String("IPSEC"),
// IpsecInternalAddresses: pulumi.StringArray{
// address.SelfLink,
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// InterconnectAttachment can be imported using any of these accepted formats
//
// ```sh
// $ pulumi import gcp:compute/interconnectAttachment:InterconnectAttachment default projects/{{project}}/regions/{{region}}/interconnectAttachments/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:compute/interconnectAttachment:InterconnectAttachment default {{project}}/{{region}}/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:compute/interconnectAttachment:InterconnectAttachment default {{region}}/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:compute/interconnectAttachment:InterconnectAttachment default {{name}}
// ```
type InterconnectAttachment struct {
pulumi.CustomResourceState
// Whether the VLAN attachment is enabled or disabled. When using
// PARTNER type this will Pre-Activate the interconnect attachment
AdminEnabled pulumi.BoolPtrOutput `pulumi:"adminEnabled"`
// Provisioned bandwidth capacity for the interconnect attachment.
// For attachments of type DEDICATED, the user can set the bandwidth.
// For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth.
// Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED,
// Defaults to BPS_10G
// Possible values are `BPS_50M`, `BPS_100M`, `BPS_200M`, `BPS_300M`, `BPS_400M`, `BPS_500M`, `BPS_1G`, `BPS_2G`, `BPS_5G`, `BPS_10G`, `BPS_20G`, and `BPS_50G`.
Bandwidth pulumi.StringOutput `pulumi:"bandwidth"`
// Up to 16 candidate prefixes that can be used to restrict the allocation
// of cloudRouterIpAddress and customerRouterIpAddress for this attachment.
// All prefixes must be within link-local address space (169.254.0.0/16)
// and must be /29 or shorter (/28, /27, etc). Google will attempt to select
// an unused /29 from the supplied candidate prefix(es). The request will
// fail if all possible /29s are in use on Google's edge. If not supplied,
// Google will randomly select an unused /29 from all of link-local space.
CandidateSubnets pulumi.StringArrayOutput `pulumi:"candidateSubnets"`
// IPv4 address + prefix length to be configured on Cloud Router Interface for this interconnect attachment.
CloudRouterIpAddress pulumi.StringOutput `pulumi:"cloudRouterIpAddress"`
// Creation timestamp in RFC3339 text format.
CreationTimestamp pulumi.StringOutput `pulumi:"creationTimestamp"`
// IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment.
CustomerRouterIpAddress pulumi.StringOutput `pulumi:"customerRouterIpAddress"`
// An optional description of this resource.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Desired availability domain for the attachment. Only available for type
// PARTNER, at creation time. For improved reliability, customers should
// configure a pair of attachments with one per availability domain. The
// selected availability domain will be provided to the Partner via the
// pairing key so that the provisioned circuit will lie in the specified
// domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.
EdgeAvailabilityDomain pulumi.StringOutput `pulumi:"edgeAvailabilityDomain"`
// Indicates the user-supplied encryption option of this interconnect
// attachment:
// NONE is the default value, which means that the attachment carries
// unencrypted traffic. VMs can send traffic to, or receive traffic
// from, this type of attachment.
// IPSEC indicates that the attachment carries only traffic encrypted by
// an IPsec device such as an HA VPN gateway. VMs cannot directly send
// traffic to, or receive traffic from, such an attachment. To use
// IPsec-encrypted Cloud Interconnect create the attachment using this
// option.
// Not currently available publicly.
// Default value is `NONE`.
// Possible values are `NONE` and `IPSEC`.
Encryption pulumi.StringPtrOutput `pulumi:"encryption"`
// Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity
// issues.
GoogleReferenceId pulumi.StringOutput `pulumi:"googleReferenceId"`
// URL of the underlying Interconnect object that this attachment's
// traffic will traverse through. Required if type is DEDICATED, must not
// be set if type is PARTNER.
Interconnect pulumi.StringPtrOutput `pulumi:"interconnect"`
// URL of addresses that have been reserved for the interconnect
// attachment, Used only for interconnect attachment that has the
// encryption option as IPSEC.
// The addresses must be RFC 1918 IP address ranges. When creating HA
// VPN gateway over the interconnect attachment, if the attachment is
// configured to use an RFC 1918 IP address, then the VPN gateway's IP
// address will be allocated from the IP address range specified
// here.
// For example, if the HA VPN gateway's interface 0 is paired to this
// interconnect attachment, then an RFC 1918 IP address for the VPN
// gateway interface 0 will be allocated from the IP address specified
// for this interconnect attachment.
// If this field is not specified for interconnect attachment that has
// encryption option as IPSEC, later on when creating HA VPN gateway on
// this interconnect attachment, the HA VPN gateway's IP address will be
// allocated from regional external IP address pool.
IpsecInternalAddresses pulumi.StringArrayOutput `pulumi:"ipsecInternalAddresses"`
// Maximum Transmission Unit (MTU), in bytes, of packets passing through
// this interconnect attachment. Currently, only 1440 and 1500 are allowed. If not specified, the value will default to 1440.
Mtu pulumi.StringOutput `pulumi:"mtu"`
// Name of the resource. Provided by the client when the resource is created. 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"`
// [Output only for type PARTNER. Not present for DEDICATED]. The opaque identifier of an PARTNER attachment used to
// initiate provisioning with a selected partner. Of the form "XXXXX/region/domain"
PairingKey pulumi.StringOutput `pulumi:"pairingKey"`
// [Output only for type PARTNER. Not present for DEDICATED]. Optional BGP ASN for the router that should be supplied by a
// layer 3 Partner if they configured BGP on behalf of the customer.
PartnerAsn pulumi.StringOutput `pulumi:"partnerAsn"`
// Information specific to an InterconnectAttachment. This property is populated if the interconnect that this is attached
// to is of type DEDICATED.
PrivateInterconnectInfos InterconnectAttachmentPrivateInterconnectInfoArrayOutput `pulumi:"privateInterconnectInfos"`
// 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 regional interconnect attachment resides.
Region pulumi.StringOutput `pulumi:"region"`
// URL of the cloud router to be used for dynamic routing. This router must be in
// the same region as this InterconnectAttachment. The InterconnectAttachment will
// automatically connect the Interconnect to the network & region within which the
// Cloud Router is configured.
Router pulumi.StringOutput `pulumi:"router"`
// The URI of the created resource.
SelfLink pulumi.StringOutput `pulumi:"selfLink"`
// [Output Only] The current state of this attachment's functionality.
State pulumi.StringOutput `pulumi:"state"`
// The type of InterconnectAttachment you wish to create. Defaults to
// DEDICATED.
// Possible values are `DEDICATED`, `PARTNER`, and `PARTNER_PROVIDER`.
Type pulumi.StringOutput `pulumi:"type"`
// The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When
// using PARTNER type this will be managed upstream.
VlanTag8021q pulumi.IntOutput `pulumi:"vlanTag8021q"`
}
// NewInterconnectAttachment registers a new resource with the given unique name, arguments, and options.
func NewInterconnectAttachment(ctx *pulumi.Context,
name string, args *InterconnectAttachmentArgs, opts ...pulumi.ResourceOption) (*InterconnectAttachment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Router == nil {
return nil, errors.New("invalid value for required argument 'Router'")
}
var resource InterconnectAttachment
err := ctx.RegisterResource("gcp:compute/interconnectAttachment:InterconnectAttachment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInterconnectAttachment gets an existing InterconnectAttachment 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 GetInterconnectAttachment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InterconnectAttachmentState, opts ...pulumi.ResourceOption) (*InterconnectAttachment, error) {
var resource InterconnectAttachment
err := ctx.ReadResource("gcp:compute/interconnectAttachment:InterconnectAttachment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering InterconnectAttachment resources.
type interconnectAttachmentState struct {
// Whether the VLAN attachment is enabled or disabled. When using
// PARTNER type this will Pre-Activate the interconnect attachment
AdminEnabled *bool `pulumi:"adminEnabled"`
// Provisioned bandwidth capacity for the interconnect attachment.
// For attachments of type DEDICATED, the user can set the bandwidth.
// For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth.
// Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED,
// Defaults to BPS_10G
// Possible values are `BPS_50M`, `BPS_100M`, `BPS_200M`, `BPS_300M`, `BPS_400M`, `BPS_500M`, `BPS_1G`, `BPS_2G`, `BPS_5G`, `BPS_10G`, `BPS_20G`, and `BPS_50G`.
Bandwidth *string `pulumi:"bandwidth"`
// Up to 16 candidate prefixes that can be used to restrict the allocation
// of cloudRouterIpAddress and customerRouterIpAddress for this attachment.
// All prefixes must be within link-local address space (169.254.0.0/16)
// and must be /29 or shorter (/28, /27, etc). Google will attempt to select
// an unused /29 from the supplied candidate prefix(es). The request will
// fail if all possible /29s are in use on Google's edge. If not supplied,
// Google will randomly select an unused /29 from all of link-local space.
CandidateSubnets []string `pulumi:"candidateSubnets"`
// IPv4 address + prefix length to be configured on Cloud Router Interface for this interconnect attachment.
CloudRouterIpAddress *string `pulumi:"cloudRouterIpAddress"`
// Creation timestamp in RFC3339 text format.
CreationTimestamp *string `pulumi:"creationTimestamp"`
// IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment.
CustomerRouterIpAddress *string `pulumi:"customerRouterIpAddress"`
// An optional description of this resource.
Description *string `pulumi:"description"`
// Desired availability domain for the attachment. Only available for type
// PARTNER, at creation time. For improved reliability, customers should
// configure a pair of attachments with one per availability domain. The
// selected availability domain will be provided to the Partner via the
// pairing key so that the provisioned circuit will lie in the specified
// domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.
EdgeAvailabilityDomain *string `pulumi:"edgeAvailabilityDomain"`
// Indicates the user-supplied encryption option of this interconnect
// attachment:
// NONE is the default value, which means that the attachment carries
// unencrypted traffic. VMs can send traffic to, or receive traffic
// from, this type of attachment.
// IPSEC indicates that the attachment carries only traffic encrypted by
// an IPsec device such as an HA VPN gateway. VMs cannot directly send
// traffic to, or receive traffic from, such an attachment. To use
// IPsec-encrypted Cloud Interconnect create the attachment using this
// option.
// Not currently available publicly.
// Default value is `NONE`.
// Possible values are `NONE` and `IPSEC`.
Encryption *string `pulumi:"encryption"`
// Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity
// issues.
GoogleReferenceId *string `pulumi:"googleReferenceId"`
// URL of the underlying Interconnect object that this attachment's
// traffic will traverse through. Required if type is DEDICATED, must not
// be set if type is PARTNER.
Interconnect *string `pulumi:"interconnect"`
// URL of addresses that have been reserved for the interconnect
// attachment, Used only for interconnect attachment that has the
// encryption option as IPSEC.
// The addresses must be RFC 1918 IP address ranges. When creating HA
// VPN gateway over the interconnect attachment, if the attachment is
// configured to use an RFC 1918 IP address, then the VPN gateway's IP
// address will be allocated from the IP address range specified
// here.
// For example, if the HA VPN gateway's interface 0 is paired to this
// interconnect attachment, then an RFC 1918 IP address for the VPN
// gateway interface 0 will be allocated from the IP address specified
// for this interconnect attachment.
// If this field is not specified for interconnect attachment that has
// encryption option as IPSEC, later on when creating HA VPN gateway on
// this interconnect attachment, the HA VPN gateway's IP address will be
// allocated from regional external IP address pool.
IpsecInternalAddresses []string `pulumi:"ipsecInternalAddresses"`
// Maximum Transmission Unit (MTU), in bytes, of packets passing through
// this interconnect attachment. Currently, only 1440 and 1500 are allowed. If not specified, the value will default to 1440.
Mtu *string `pulumi:"mtu"`
// Name of the resource. Provided by the client when the resource is created. 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"`
// [Output only for type PARTNER. Not present for DEDICATED]. The opaque identifier of an PARTNER attachment used to
// initiate provisioning with a selected partner. Of the form "XXXXX/region/domain"
PairingKey *string `pulumi:"pairingKey"`
// [Output only for type PARTNER. Not present for DEDICATED]. Optional BGP ASN for the router that should be supplied by a
// layer 3 Partner if they configured BGP on behalf of the customer.
PartnerAsn *string `pulumi:"partnerAsn"`
// Information specific to an InterconnectAttachment. This property is populated if the interconnect that this is attached
// to is of type DEDICATED.
PrivateInterconnectInfos []InterconnectAttachmentPrivateInterconnectInfo `pulumi:"privateInterconnectInfos"`
// 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 regional interconnect attachment resides.
Region *string `pulumi:"region"`
// URL of the cloud router to be used for dynamic routing. This router must be in
// the same region as this InterconnectAttachment. The InterconnectAttachment will
// automatically connect the Interconnect to the network & region within which the
// Cloud Router is configured.
Router *string `pulumi:"router"`
// The URI of the created resource.
SelfLink *string `pulumi:"selfLink"`
// [Output Only] The current state of this attachment's functionality.
State *string `pulumi:"state"`
// The type of InterconnectAttachment you wish to create. Defaults to
// DEDICATED.
// Possible values are `DEDICATED`, `PARTNER`, and `PARTNER_PROVIDER`.
Type *string `pulumi:"type"`
// The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When
// using PARTNER type this will be managed upstream.
VlanTag8021q *int `pulumi:"vlanTag8021q"`
}
type InterconnectAttachmentState struct {
// Whether the VLAN attachment is enabled or disabled. When using
// PARTNER type this will Pre-Activate the interconnect attachment
AdminEnabled pulumi.BoolPtrInput
// Provisioned bandwidth capacity for the interconnect attachment.
// For attachments of type DEDICATED, the user can set the bandwidth.
// For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth.
// Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED,
// Defaults to BPS_10G
// Possible values are `BPS_50M`, `BPS_100M`, `BPS_200M`, `BPS_300M`, `BPS_400M`, `BPS_500M`, `BPS_1G`, `BPS_2G`, `BPS_5G`, `BPS_10G`, `BPS_20G`, and `BPS_50G`.
Bandwidth pulumi.StringPtrInput
// Up to 16 candidate prefixes that can be used to restrict the allocation
// of cloudRouterIpAddress and customerRouterIpAddress for this attachment.
// All prefixes must be within link-local address space (169.254.0.0/16)
// and must be /29 or shorter (/28, /27, etc). Google will attempt to select
// an unused /29 from the supplied candidate prefix(es). The request will
// fail if all possible /29s are in use on Google's edge. If not supplied,
// Google will randomly select an unused /29 from all of link-local space.
CandidateSubnets pulumi.StringArrayInput
// IPv4 address + prefix length to be configured on Cloud Router Interface for this interconnect attachment.
CloudRouterIpAddress pulumi.StringPtrInput
// Creation timestamp in RFC3339 text format.
CreationTimestamp pulumi.StringPtrInput
// IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment.
CustomerRouterIpAddress pulumi.StringPtrInput
// An optional description of this resource.
Description pulumi.StringPtrInput
// Desired availability domain for the attachment. Only available for type
// PARTNER, at creation time. For improved reliability, customers should
// configure a pair of attachments with one per availability domain. The
// selected availability domain will be provided to the Partner via the
// pairing key so that the provisioned circuit will lie in the specified
// domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.
EdgeAvailabilityDomain pulumi.StringPtrInput
// Indicates the user-supplied encryption option of this interconnect
// attachment:
// NONE is the default value, which means that the attachment carries
// unencrypted traffic. VMs can send traffic to, or receive traffic
// from, this type of attachment.
// IPSEC indicates that the attachment carries only traffic encrypted by
// an IPsec device such as an HA VPN gateway. VMs cannot directly send
// traffic to, or receive traffic from, such an attachment. To use
// IPsec-encrypted Cloud Interconnect create the attachment using this
// option.
// Not currently available publicly.
// Default value is `NONE`.
// Possible values are `NONE` and `IPSEC`.
Encryption pulumi.StringPtrInput
// Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity
// issues.
GoogleReferenceId pulumi.StringPtrInput
// URL of the underlying Interconnect object that this attachment's
// traffic will traverse through. Required if type is DEDICATED, must not
// be set if type is PARTNER.
Interconnect pulumi.StringPtrInput
// URL of addresses that have been reserved for the interconnect
// attachment, Used only for interconnect attachment that has the
// encryption option as IPSEC.
// The addresses must be RFC 1918 IP address ranges. When creating HA
// VPN gateway over the interconnect attachment, if the attachment is
// configured to use an RFC 1918 IP address, then the VPN gateway's IP
// address will be allocated from the IP address range specified
// here.
// For example, if the HA VPN gateway's interface 0 is paired to this
// interconnect attachment, then an RFC 1918 IP address for the VPN
// gateway interface 0 will be allocated from the IP address specified
// for this interconnect attachment.
// If this field is not specified for interconnect attachment that has
// encryption option as IPSEC, later on when creating HA VPN gateway on
// this interconnect attachment, the HA VPN gateway's IP address will be
// allocated from regional external IP address pool.
IpsecInternalAddresses pulumi.StringArrayInput
// Maximum Transmission Unit (MTU), in bytes, of packets passing through
// this interconnect attachment. Currently, only 1440 and 1500 are allowed. If not specified, the value will default to 1440.
Mtu pulumi.StringPtrInput
// Name of the resource. Provided by the client when the resource is created. 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
// [Output only for type PARTNER. Not present for DEDICATED]. The opaque identifier of an PARTNER attachment used to
// initiate provisioning with a selected partner. Of the form "XXXXX/region/domain"
PairingKey pulumi.StringPtrInput
// [Output only for type PARTNER. Not present for DEDICATED]. Optional BGP ASN for the router that should be supplied by a
// layer 3 Partner if they configured BGP on behalf of the customer.
PartnerAsn pulumi.StringPtrInput
// Information specific to an InterconnectAttachment. This property is populated if the interconnect that this is attached
// to is of type DEDICATED.
PrivateInterconnectInfos InterconnectAttachmentPrivateInterconnectInfoArrayInput
// 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 regional interconnect attachment resides.
Region pulumi.StringPtrInput
// URL of the cloud router to be used for dynamic routing. This router must be in
// the same region as this InterconnectAttachment. The InterconnectAttachment will
// automatically connect the Interconnect to the network & region within which the
// Cloud Router is configured.
Router pulumi.StringPtrInput
// The URI of the created resource.
SelfLink pulumi.StringPtrInput
// [Output Only] The current state of this attachment's functionality.
State pulumi.StringPtrInput
// The type of InterconnectAttachment you wish to create. Defaults to
// DEDICATED.
// Possible values are `DEDICATED`, `PARTNER`, and `PARTNER_PROVIDER`.
Type pulumi.StringPtrInput
// The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When
// using PARTNER type this will be managed upstream.
VlanTag8021q pulumi.IntPtrInput
}
func (InterconnectAttachmentState) ElementType() reflect.Type {
return reflect.TypeOf((*interconnectAttachmentState)(nil)).Elem()
}
type interconnectAttachmentArgs struct {
// Whether the VLAN attachment is enabled or disabled. When using
// PARTNER type this will Pre-Activate the interconnect attachment
AdminEnabled *bool `pulumi:"adminEnabled"`
// Provisioned bandwidth capacity for the interconnect attachment.
// For attachments of type DEDICATED, the user can set the bandwidth.
// For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth.
// Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED,
// Defaults to BPS_10G
// Possible values are `BPS_50M`, `BPS_100M`, `BPS_200M`, `BPS_300M`, `BPS_400M`, `BPS_500M`, `BPS_1G`, `BPS_2G`, `BPS_5G`, `BPS_10G`, `BPS_20G`, and `BPS_50G`.
Bandwidth *string `pulumi:"bandwidth"`
// Up to 16 candidate prefixes that can be used to restrict the allocation
// of cloudRouterIpAddress and customerRouterIpAddress for this attachment.
// All prefixes must be within link-local address space (169.254.0.0/16)
// and must be /29 or shorter (/28, /27, etc). Google will attempt to select
// an unused /29 from the supplied candidate prefix(es). The request will
// fail if all possible /29s are in use on Google's edge. If not supplied,
// Google will randomly select an unused /29 from all of link-local space.
CandidateSubnets []string `pulumi:"candidateSubnets"`
// An optional description of this resource.
Description *string `pulumi:"description"`
// Desired availability domain for the attachment. Only available for type
// PARTNER, at creation time. For improved reliability, customers should
// configure a pair of attachments with one per availability domain. The
// selected availability domain will be provided to the Partner via the
// pairing key so that the provisioned circuit will lie in the specified
// domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.
EdgeAvailabilityDomain *string `pulumi:"edgeAvailabilityDomain"`
// Indicates the user-supplied encryption option of this interconnect
// attachment:
// NONE is the default value, which means that the attachment carries
// unencrypted traffic. VMs can send traffic to, or receive traffic
// from, this type of attachment.
// IPSEC indicates that the attachment carries only traffic encrypted by
// an IPsec device such as an HA VPN gateway. VMs cannot directly send
// traffic to, or receive traffic from, such an attachment. To use
// IPsec-encrypted Cloud Interconnect create the attachment using this
// option.
// Not currently available publicly.
// Default value is `NONE`.
// Possible values are `NONE` and `IPSEC`.
Encryption *string `pulumi:"encryption"`
// URL of the underlying Interconnect object that this attachment's
// traffic will traverse through. Required if type is DEDICATED, must not
// be set if type is PARTNER.
Interconnect *string `pulumi:"interconnect"`
// URL of addresses that have been reserved for the interconnect
// attachment, Used only for interconnect attachment that has the
// encryption option as IPSEC.
// The addresses must be RFC 1918 IP address ranges. When creating HA
// VPN gateway over the interconnect attachment, if the attachment is
// configured to use an RFC 1918 IP address, then the VPN gateway's IP
// address will be allocated from the IP address range specified
// here.
// For example, if the HA VPN gateway's interface 0 is paired to this
// interconnect attachment, then an RFC 1918 IP address for the VPN
// gateway interface 0 will be allocated from the IP address specified
// for this interconnect attachment.
// If this field is not specified for interconnect attachment that has
// encryption option as IPSEC, later on when creating HA VPN gateway on
// this interconnect attachment, the HA VPN gateway's IP address will be
// allocated from regional external IP address pool.
IpsecInternalAddresses []string `pulumi:"ipsecInternalAddresses"`
// Maximum Transmission Unit (MTU), in bytes, of packets passing through
// this interconnect attachment. Currently, only 1440 and 1500 are allowed. If not specified, the value will default to 1440.
Mtu *string `pulumi:"mtu"`
// Name of the resource. Provided by the client when the resource is created. 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"`
// 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 regional interconnect attachment resides.
Region *string `pulumi:"region"`
// URL of the cloud router to be used for dynamic routing. This router must be in
// the same region as this InterconnectAttachment. The InterconnectAttachment will
// automatically connect the Interconnect to the network & region within which the
// Cloud Router is configured.
Router string `pulumi:"router"`
// The type of InterconnectAttachment you wish to create. Defaults to
// DEDICATED.
// Possible values are `DEDICATED`, `PARTNER`, and `PARTNER_PROVIDER`.
Type *string `pulumi:"type"`
// The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When
// using PARTNER type this will be managed upstream.
VlanTag8021q *int `pulumi:"vlanTag8021q"`
}
// The set of arguments for constructing a InterconnectAttachment resource.
type InterconnectAttachmentArgs struct {
// Whether the VLAN attachment is enabled or disabled. When using
// PARTNER type this will Pre-Activate the interconnect attachment
AdminEnabled pulumi.BoolPtrInput
// Provisioned bandwidth capacity for the interconnect attachment.
// For attachments of type DEDICATED, the user can set the bandwidth.
// For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth.
// Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED,
// Defaults to BPS_10G
// Possible values are `BPS_50M`, `BPS_100M`, `BPS_200M`, `BPS_300M`, `BPS_400M`, `BPS_500M`, `BPS_1G`, `BPS_2G`, `BPS_5G`, `BPS_10G`, `BPS_20G`, and `BPS_50G`.
Bandwidth pulumi.StringPtrInput
// Up to 16 candidate prefixes that can be used to restrict the allocation
// of cloudRouterIpAddress and customerRouterIpAddress for this attachment.
// All prefixes must be within link-local address space (169.254.0.0/16)
// and must be /29 or shorter (/28, /27, etc). Google will attempt to select
// an unused /29 from the supplied candidate prefix(es). The request will
// fail if all possible /29s are in use on Google's edge. If not supplied,
// Google will randomly select an unused /29 from all of link-local space.
CandidateSubnets pulumi.StringArrayInput
// An optional description of this resource.
Description pulumi.StringPtrInput
// Desired availability domain for the attachment. Only available for type
// PARTNER, at creation time. For improved reliability, customers should
// configure a pair of attachments with one per availability domain. The
// selected availability domain will be provided to the Partner via the
// pairing key so that the provisioned circuit will lie in the specified
// domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.
EdgeAvailabilityDomain pulumi.StringPtrInput
// Indicates the user-supplied encryption option of this interconnect
// attachment:
// NONE is the default value, which means that the attachment carries
// unencrypted traffic. VMs can send traffic to, or receive traffic
// from, this type of attachment.
// IPSEC indicates that the attachment carries only traffic encrypted by
// an IPsec device such as an HA VPN gateway. VMs cannot directly send
// traffic to, or receive traffic from, such an attachment. To use
// IPsec-encrypted Cloud Interconnect create the attachment using this
// option.
// Not currently available publicly.
// Default value is `NONE`.
// Possible values are `NONE` and `IPSEC`.
Encryption pulumi.StringPtrInput
// URL of the underlying Interconnect object that this attachment's
// traffic will traverse through. Required if type is DEDICATED, must not
// be set if type is PARTNER.
Interconnect pulumi.StringPtrInput
// URL of addresses that have been reserved for the interconnect
// attachment, Used only for interconnect attachment that has the
// encryption option as IPSEC.
// The addresses must be RFC 1918 IP address ranges. When creating HA
// VPN gateway over the interconnect attachment, if the attachment is
// configured to use an RFC 1918 IP address, then the VPN gateway's IP
// address will be allocated from the IP address range specified
// here.
// For example, if the HA VPN gateway's interface 0 is paired to this
// interconnect attachment, then an RFC 1918 IP address for the VPN
// gateway interface 0 will be allocated from the IP address specified
// for this interconnect attachment.
// If this field is not specified for interconnect attachment that has
// encryption option as IPSEC, later on when creating HA VPN gateway on
// this interconnect attachment, the HA VPN gateway's IP address will be
// allocated from regional external IP address pool.
IpsecInternalAddresses pulumi.StringArrayInput
// Maximum Transmission Unit (MTU), in bytes, of packets passing through
// this interconnect attachment. Currently, only 1440 and 1500 are allowed. If not specified, the value will default to 1440.
Mtu pulumi.StringPtrInput
// Name of the resource. Provided by the client when the resource is created. 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
// 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 regional interconnect attachment resides.
Region pulumi.StringPtrInput
// URL of the cloud router to be used for dynamic routing. This router must be in
// the same region as this InterconnectAttachment. The InterconnectAttachment will
// automatically connect the Interconnect to the network & region within which the
// Cloud Router is configured.
Router pulumi.StringInput
// The type of InterconnectAttachment you wish to create. Defaults to
// DEDICATED.
// Possible values are `DEDICATED`, `PARTNER`, and `PARTNER_PROVIDER`.
Type pulumi.StringPtrInput
// The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When
// using PARTNER type this will be managed upstream.
VlanTag8021q pulumi.IntPtrInput
}
func (InterconnectAttachmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*interconnectAttachmentArgs)(nil)).Elem()
}
type InterconnectAttachmentInput interface {
pulumi.Input
ToInterconnectAttachmentOutput() InterconnectAttachmentOutput
ToInterconnectAttachmentOutputWithContext(ctx context.Context) InterconnectAttachmentOutput
}
func (*InterconnectAttachment) ElementType() reflect.Type {
return reflect.TypeOf((*InterconnectAttachment)(nil))
}
func (i *InterconnectAttachment) ToInterconnectAttachmentOutput() InterconnectAttachmentOutput {
return i.ToInterconnectAttachmentOutputWithContext(context.Background())
}
func (i *InterconnectAttachment) ToInterconnectAttachmentOutputWithContext(ctx context.Context) InterconnectAttachmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(InterconnectAttachmentOutput)
}
func (i *InterconnectAttachment) ToInterconnectAttachmentPtrOutput() InterconnectAttachmentPtrOutput {
return i.ToInterconnectAttachmentPtrOutputWithContext(context.Background())
}
func (i *InterconnectAttachment) ToInterconnectAttachmentPtrOutputWithContext(ctx context.Context) InterconnectAttachmentPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(InterconnectAttachmentPtrOutput)
}
type InterconnectAttachmentPtrInput interface {
pulumi.Input
ToInterconnectAttachmentPtrOutput() InterconnectAttachmentPtrOutput
ToInterconnectAttachmentPtrOutputWithContext(ctx context.Context) InterconnectAttachmentPtrOutput
}
type interconnectAttachmentPtrType InterconnectAttachmentArgs
func (*interconnectAttachmentPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**InterconnectAttachment)(nil))
}
func (i *interconnectAttachmentPtrType) ToInterconnectAttachmentPtrOutput() InterconnectAttachmentPtrOutput {
return i.ToInterconnectAttachmentPtrOutputWithContext(context.Background())
}
func (i *interconnectAttachmentPtrType) ToInterconnectAttachmentPtrOutputWithContext(ctx context.Context) InterconnectAttachmentPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(InterconnectAttachmentPtrOutput)
}
// InterconnectAttachmentArrayInput is an input type that accepts InterconnectAttachmentArray and InterconnectAttachmentArrayOutput values.
// You can construct a concrete instance of `InterconnectAttachmentArrayInput` via:
//
// InterconnectAttachmentArray{ InterconnectAttachmentArgs{...} }
type InterconnectAttachmentArrayInput interface {
pulumi.Input
ToInterconnectAttachmentArrayOutput() InterconnectAttachmentArrayOutput
ToInterconnectAttachmentArrayOutputWithContext(context.Context) InterconnectAttachmentArrayOutput
}
type InterconnectAttachmentArray []InterconnectAttachmentInput
func (InterconnectAttachmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*InterconnectAttachment)(nil)).Elem()
}
func (i InterconnectAttachmentArray) ToInterconnectAttachmentArrayOutput() InterconnectAttachmentArrayOutput {
return i.ToInterconnectAttachmentArrayOutputWithContext(context.Background())
}
func (i InterconnectAttachmentArray) ToInterconnectAttachmentArrayOutputWithContext(ctx context.Context) InterconnectAttachmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(InterconnectAttachmentArrayOutput)
}
// InterconnectAttachmentMapInput is an input type that accepts InterconnectAttachmentMap and InterconnectAttachmentMapOutput values.
// You can construct a concrete instance of `InterconnectAttachmentMapInput` via:
//
// InterconnectAttachmentMap{ "key": InterconnectAttachmentArgs{...} }
type InterconnectAttachmentMapInput interface {
pulumi.Input
ToInterconnectAttachmentMapOutput() InterconnectAttachmentMapOutput
ToInterconnectAttachmentMapOutputWithContext(context.Context) InterconnectAttachmentMapOutput
}
type InterconnectAttachmentMap map[string]InterconnectAttachmentInput
func (InterconnectAttachmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*InterconnectAttachment)(nil)).Elem()
}
func (i InterconnectAttachmentMap) ToInterconnectAttachmentMapOutput() InterconnectAttachmentMapOutput {
return i.ToInterconnectAttachmentMapOutputWithContext(context.Background())
}
func (i InterconnectAttachmentMap) ToInterconnectAttachmentMapOutputWithContext(ctx context.Context) InterconnectAttachmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(InterconnectAttachmentMapOutput)
}
type InterconnectAttachmentOutput struct{ *pulumi.OutputState }
func (InterconnectAttachmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((*InterconnectAttachment)(nil))
}
func (o InterconnectAttachmentOutput) ToInterconnectAttachmentOutput() InterconnectAttachmentOutput {
return o
}
func (o InterconnectAttachmentOutput) ToInterconnectAttachmentOutputWithContext(ctx context.Context) InterconnectAttachmentOutput {
return o
}
func (o InterconnectAttachmentOutput) ToInterconnectAttachmentPtrOutput() InterconnectAttachmentPtrOutput {
return o.ToInterconnectAttachmentPtrOutputWithContext(context.Background())
}
func (o InterconnectAttachmentOutput) ToInterconnectAttachmentPtrOutputWithContext(ctx context.Context) InterconnectAttachmentPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v InterconnectAttachment) *InterconnectAttachment {
return &v
}).(InterconnectAttachmentPtrOutput)
}
type InterconnectAttachmentPtrOutput struct{ *pulumi.OutputState }
func (InterconnectAttachmentPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**InterconnectAttachment)(nil))
}
func (o InterconnectAttachmentPtrOutput) ToInterconnectAttachmentPtrOutput() InterconnectAttachmentPtrOutput {
return o
}
func (o InterconnectAttachmentPtrOutput) ToInterconnectAttachmentPtrOutputWithContext(ctx context.Context) InterconnectAttachmentPtrOutput {
return o
}
func (o InterconnectAttachmentPtrOutput) Elem() InterconnectAttachmentOutput {
return o.ApplyT(func(v *InterconnectAttachment) InterconnectAttachment {
if v != nil {
return *v
}
var ret InterconnectAttachment
return ret
}).(InterconnectAttachmentOutput)
}
type InterconnectAttachmentArrayOutput struct{ *pulumi.OutputState }
func (InterconnectAttachmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]InterconnectAttachment)(nil))
}
func (o InterconnectAttachmentArrayOutput) ToInterconnectAttachmentArrayOutput() InterconnectAttachmentArrayOutput {
return o
}
func (o InterconnectAttachmentArrayOutput) ToInterconnectAttachmentArrayOutputWithContext(ctx context.Context) InterconnectAttachmentArrayOutput {
return o
}
func (o InterconnectAttachmentArrayOutput) Index(i pulumi.IntInput) InterconnectAttachmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) InterconnectAttachment {
return vs[0].([]InterconnectAttachment)[vs[1].(int)]
}).(InterconnectAttachmentOutput)
}
type InterconnectAttachmentMapOutput struct{ *pulumi.OutputState }
func (InterconnectAttachmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]InterconnectAttachment)(nil))
}
func (o InterconnectAttachmentMapOutput) ToInterconnectAttachmentMapOutput() InterconnectAttachmentMapOutput {
return o
}
func (o InterconnectAttachmentMapOutput) ToInterconnectAttachmentMapOutputWithContext(ctx context.Context) InterconnectAttachmentMapOutput {
return o
}
func (o InterconnectAttachmentMapOutput) MapIndex(k pulumi.StringInput) InterconnectAttachmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) InterconnectAttachment {
return vs[0].(map[string]InterconnectAttachment)[vs[1].(string)]
}).(InterconnectAttachmentOutput)
}
func init() {
pulumi.RegisterOutputType(InterconnectAttachmentOutput{})
pulumi.RegisterOutputType(InterconnectAttachmentPtrOutput{})
pulumi.RegisterOutputType(InterconnectAttachmentArrayOutput{})
pulumi.RegisterOutputType(InterconnectAttachmentMapOutput{})
}