This repository has been archived by the owner on Aug 15, 2022. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
connection.go
711 lines (634 loc) · 35.8 KB
/
connection.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
// 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 vpn
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type Connection struct {
pulumi.CustomResourceState
// Create time of the VPN connection.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// ID of the customer gateway.
CustomerGatewayId pulumi.StringOutput `pulumi:"customerGatewayId"`
// Encrypt proto of the VPN connection.
EncryptProto pulumi.StringOutput `pulumi:"encryptProto"`
// DH group name of the IKE operation specification. Valid values: `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`.
// Default value is `GROUP1`.
IkeDhGroupName pulumi.StringPtrOutput `pulumi:"ikeDhGroupName"`
// Exchange mode of the IKE operation specification. Valid values: `AGGRESSIVE`, `MAIN`. Default value is `MAIN`.
IkeExchangeMode pulumi.StringPtrOutput `pulumi:"ikeExchangeMode"`
// Local address of IKE operation specification, valid when ike_local_identity is `ADDRESS`, generally the value is
// `public_ip_address` of the related VPN gateway.
IkeLocalAddress pulumi.StringPtrOutput `pulumi:"ikeLocalAddress"`
// Local FQDN name of the IKE operation specification.
IkeLocalFqdnName pulumi.StringPtrOutput `pulumi:"ikeLocalFqdnName"`
// Local identity way of IKE operation specification. Valid values: `ADDRESS`, `FQDN`. Default value is `ADDRESS`.
IkeLocalIdentity pulumi.StringPtrOutput `pulumi:"ikeLocalIdentity"`
// Proto authenticate algorithm of the IKE operation specification. Valid values: `MD5`, `SHA`, `SHA-256`. Default Value is
// `MD5`.
IkeProtoAuthenAlgorithm pulumi.StringPtrOutput `pulumi:"ikeProtoAuthenAlgorithm"`
// Proto encrypt algorithm of the IKE operation specification. Valid values: `3DES-CBC`, `AES-CBC-128`, `AES-CBC-128`,
// `AES-CBC-256`, `DES-CBC`. Default value is `3DES-CBC`.
IkeProtoEncryAlgorithm pulumi.StringPtrOutput `pulumi:"ikeProtoEncryAlgorithm"`
// Remote address of IKE operation specification, valid when ike_remote_identity is `ADDRESS`, generally the value is
// `public_ip_address` of the related customer gateway.
IkeRemoteAddress pulumi.StringPtrOutput `pulumi:"ikeRemoteAddress"`
// Remote FQDN name of the IKE operation specification.
IkeRemoteFqdnName pulumi.StringPtrOutput `pulumi:"ikeRemoteFqdnName"`
// Remote identity way of IKE operation specification. Valid values: `ADDRESS`, `FQDN`. Default value is `ADDRESS`.
IkeRemoteIdentity pulumi.StringPtrOutput `pulumi:"ikeRemoteIdentity"`
// SA lifetime of the IKE operation specification, unit is `second`. The value ranges from 60 to 604800. Default value is
// 86400 seconds.
IkeSaLifetimeSeconds pulumi.IntPtrOutput `pulumi:"ikeSaLifetimeSeconds"`
// Version of the IKE operation specification. Default value is `IKEV1`.
IkeVersion pulumi.StringPtrOutput `pulumi:"ikeVersion"`
// Encrypt algorithm of the IPSEC operation specification. Valid values: `3DES-CBC`, `AES-CBC-128`, `AES-CBC-128`,
// `AES-CBC-256`, `DES-CBC`. Default value is `3DES-CBC`.
IpsecEncryptAlgorithm pulumi.StringPtrOutput `pulumi:"ipsecEncryptAlgorithm"`
// Integrity algorithm of the IPSEC operation specification. Valid values: `SHA1`, `MD5`, `SHA-256`. Default value is
// `MD5`.
IpsecIntegrityAlgorithm pulumi.StringPtrOutput `pulumi:"ipsecIntegrityAlgorithm"`
// PFS DH group. Valid value: `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`, `NULL`. Default value is `NULL`.
IpsecPfsDhGroup pulumi.StringPtrOutput `pulumi:"ipsecPfsDhGroup"`
// SA lifetime of the IPSEC operation specification, unit is second. Valid value ranges: [180~604800]. Default value is
// 3600 seconds.
IpsecSaLifetimeSeconds pulumi.IntPtrOutput `pulumi:"ipsecSaLifetimeSeconds"`
// SA lifetime of the IPSEC operation specification, unit is KB. The value should not be less then 2560. Default value is
// 1843200.
IpsecSaLifetimeTraffic pulumi.IntPtrOutput `pulumi:"ipsecSaLifetimeTraffic"`
// Indicate whether is ccn type. Modification of this field only impacts force new logic of `vpc_id`. If `is_ccn_type` is
// true, modification of `vpc_id` will be ignored.
IsCcnType pulumi.BoolOutput `pulumi:"isCcnType"`
// Name of the VPN connection. The length of character is limited to 1-60.
Name pulumi.StringOutput `pulumi:"name"`
// Net status of the VPN connection. Valid value: `AVAILABLE`.
NetStatus pulumi.StringOutput `pulumi:"netStatus"`
// Pre-shared key of the VPN connection.
PreShareKey pulumi.StringOutput `pulumi:"preShareKey"`
// Route type of the VPN connection.
RouteType pulumi.StringOutput `pulumi:"routeType"`
// Security group policy of the VPN connection.
SecurityGroupPolicies ConnectionSecurityGroupPolicyArrayOutput `pulumi:"securityGroupPolicies"`
// State of the connection. Valid value: `PENDING`, `AVAILABLE`, `DELETING`.
State pulumi.StringOutput `pulumi:"state"`
// A list of tags used to associate different resources.
Tags pulumi.MapOutput `pulumi:"tags"`
// ID of the VPC. Required if vpn gateway is not in `CCN` type, and doesn't make sense for `CCN` vpn gateway.
VpcId pulumi.StringPtrOutput `pulumi:"vpcId"`
// ID of the VPN gateway.
VpnGatewayId pulumi.StringOutput `pulumi:"vpnGatewayId"`
// Vpn proto of the VPN connection.
VpnProto pulumi.StringOutput `pulumi:"vpnProto"`
}
// NewConnection registers a new resource with the given unique name, arguments, and options.
func NewConnection(ctx *pulumi.Context,
name string, args *ConnectionArgs, opts ...pulumi.ResourceOption) (*Connection, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CustomerGatewayId == nil {
return nil, errors.New("invalid value for required argument 'CustomerGatewayId'")
}
if args.PreShareKey == nil {
return nil, errors.New("invalid value for required argument 'PreShareKey'")
}
if args.SecurityGroupPolicies == nil {
return nil, errors.New("invalid value for required argument 'SecurityGroupPolicies'")
}
if args.VpnGatewayId == nil {
return nil, errors.New("invalid value for required argument 'VpnGatewayId'")
}
var resource Connection
err := ctx.RegisterResource("tctest:Vpn/connection:Connection", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConnection gets an existing Connection 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 GetConnection(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConnectionState, opts ...pulumi.ResourceOption) (*Connection, error) {
var resource Connection
err := ctx.ReadResource("tctest:Vpn/connection:Connection", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Connection resources.
type connectionState struct {
// Create time of the VPN connection.
CreateTime *string `pulumi:"createTime"`
// ID of the customer gateway.
CustomerGatewayId *string `pulumi:"customerGatewayId"`
// Encrypt proto of the VPN connection.
EncryptProto *string `pulumi:"encryptProto"`
// DH group name of the IKE operation specification. Valid values: `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`.
// Default value is `GROUP1`.
IkeDhGroupName *string `pulumi:"ikeDhGroupName"`
// Exchange mode of the IKE operation specification. Valid values: `AGGRESSIVE`, `MAIN`. Default value is `MAIN`.
IkeExchangeMode *string `pulumi:"ikeExchangeMode"`
// Local address of IKE operation specification, valid when ike_local_identity is `ADDRESS`, generally the value is
// `public_ip_address` of the related VPN gateway.
IkeLocalAddress *string `pulumi:"ikeLocalAddress"`
// Local FQDN name of the IKE operation specification.
IkeLocalFqdnName *string `pulumi:"ikeLocalFqdnName"`
// Local identity way of IKE operation specification. Valid values: `ADDRESS`, `FQDN`. Default value is `ADDRESS`.
IkeLocalIdentity *string `pulumi:"ikeLocalIdentity"`
// Proto authenticate algorithm of the IKE operation specification. Valid values: `MD5`, `SHA`, `SHA-256`. Default Value is
// `MD5`.
IkeProtoAuthenAlgorithm *string `pulumi:"ikeProtoAuthenAlgorithm"`
// Proto encrypt algorithm of the IKE operation specification. Valid values: `3DES-CBC`, `AES-CBC-128`, `AES-CBC-128`,
// `AES-CBC-256`, `DES-CBC`. Default value is `3DES-CBC`.
IkeProtoEncryAlgorithm *string `pulumi:"ikeProtoEncryAlgorithm"`
// Remote address of IKE operation specification, valid when ike_remote_identity is `ADDRESS`, generally the value is
// `public_ip_address` of the related customer gateway.
IkeRemoteAddress *string `pulumi:"ikeRemoteAddress"`
// Remote FQDN name of the IKE operation specification.
IkeRemoteFqdnName *string `pulumi:"ikeRemoteFqdnName"`
// Remote identity way of IKE operation specification. Valid values: `ADDRESS`, `FQDN`. Default value is `ADDRESS`.
IkeRemoteIdentity *string `pulumi:"ikeRemoteIdentity"`
// SA lifetime of the IKE operation specification, unit is `second`. The value ranges from 60 to 604800. Default value is
// 86400 seconds.
IkeSaLifetimeSeconds *int `pulumi:"ikeSaLifetimeSeconds"`
// Version of the IKE operation specification. Default value is `IKEV1`.
IkeVersion *string `pulumi:"ikeVersion"`
// Encrypt algorithm of the IPSEC operation specification. Valid values: `3DES-CBC`, `AES-CBC-128`, `AES-CBC-128`,
// `AES-CBC-256`, `DES-CBC`. Default value is `3DES-CBC`.
IpsecEncryptAlgorithm *string `pulumi:"ipsecEncryptAlgorithm"`
// Integrity algorithm of the IPSEC operation specification. Valid values: `SHA1`, `MD5`, `SHA-256`. Default value is
// `MD5`.
IpsecIntegrityAlgorithm *string `pulumi:"ipsecIntegrityAlgorithm"`
// PFS DH group. Valid value: `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`, `NULL`. Default value is `NULL`.
IpsecPfsDhGroup *string `pulumi:"ipsecPfsDhGroup"`
// SA lifetime of the IPSEC operation specification, unit is second. Valid value ranges: [180~604800]. Default value is
// 3600 seconds.
IpsecSaLifetimeSeconds *int `pulumi:"ipsecSaLifetimeSeconds"`
// SA lifetime of the IPSEC operation specification, unit is KB. The value should not be less then 2560. Default value is
// 1843200.
IpsecSaLifetimeTraffic *int `pulumi:"ipsecSaLifetimeTraffic"`
// Indicate whether is ccn type. Modification of this field only impacts force new logic of `vpc_id`. If `is_ccn_type` is
// true, modification of `vpc_id` will be ignored.
IsCcnType *bool `pulumi:"isCcnType"`
// Name of the VPN connection. The length of character is limited to 1-60.
Name *string `pulumi:"name"`
// Net status of the VPN connection. Valid value: `AVAILABLE`.
NetStatus *string `pulumi:"netStatus"`
// Pre-shared key of the VPN connection.
PreShareKey *string `pulumi:"preShareKey"`
// Route type of the VPN connection.
RouteType *string `pulumi:"routeType"`
// Security group policy of the VPN connection.
SecurityGroupPolicies []ConnectionSecurityGroupPolicy `pulumi:"securityGroupPolicies"`
// State of the connection. Valid value: `PENDING`, `AVAILABLE`, `DELETING`.
State *string `pulumi:"state"`
// A list of tags used to associate different resources.
Tags map[string]interface{} `pulumi:"tags"`
// ID of the VPC. Required if vpn gateway is not in `CCN` type, and doesn't make sense for `CCN` vpn gateway.
VpcId *string `pulumi:"vpcId"`
// ID of the VPN gateway.
VpnGatewayId *string `pulumi:"vpnGatewayId"`
// Vpn proto of the VPN connection.
VpnProto *string `pulumi:"vpnProto"`
}
type ConnectionState struct {
// Create time of the VPN connection.
CreateTime pulumi.StringPtrInput
// ID of the customer gateway.
CustomerGatewayId pulumi.StringPtrInput
// Encrypt proto of the VPN connection.
EncryptProto pulumi.StringPtrInput
// DH group name of the IKE operation specification. Valid values: `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`.
// Default value is `GROUP1`.
IkeDhGroupName pulumi.StringPtrInput
// Exchange mode of the IKE operation specification. Valid values: `AGGRESSIVE`, `MAIN`. Default value is `MAIN`.
IkeExchangeMode pulumi.StringPtrInput
// Local address of IKE operation specification, valid when ike_local_identity is `ADDRESS`, generally the value is
// `public_ip_address` of the related VPN gateway.
IkeLocalAddress pulumi.StringPtrInput
// Local FQDN name of the IKE operation specification.
IkeLocalFqdnName pulumi.StringPtrInput
// Local identity way of IKE operation specification. Valid values: `ADDRESS`, `FQDN`. Default value is `ADDRESS`.
IkeLocalIdentity pulumi.StringPtrInput
// Proto authenticate algorithm of the IKE operation specification. Valid values: `MD5`, `SHA`, `SHA-256`. Default Value is
// `MD5`.
IkeProtoAuthenAlgorithm pulumi.StringPtrInput
// Proto encrypt algorithm of the IKE operation specification. Valid values: `3DES-CBC`, `AES-CBC-128`, `AES-CBC-128`,
// `AES-CBC-256`, `DES-CBC`. Default value is `3DES-CBC`.
IkeProtoEncryAlgorithm pulumi.StringPtrInput
// Remote address of IKE operation specification, valid when ike_remote_identity is `ADDRESS`, generally the value is
// `public_ip_address` of the related customer gateway.
IkeRemoteAddress pulumi.StringPtrInput
// Remote FQDN name of the IKE operation specification.
IkeRemoteFqdnName pulumi.StringPtrInput
// Remote identity way of IKE operation specification. Valid values: `ADDRESS`, `FQDN`. Default value is `ADDRESS`.
IkeRemoteIdentity pulumi.StringPtrInput
// SA lifetime of the IKE operation specification, unit is `second`. The value ranges from 60 to 604800. Default value is
// 86400 seconds.
IkeSaLifetimeSeconds pulumi.IntPtrInput
// Version of the IKE operation specification. Default value is `IKEV1`.
IkeVersion pulumi.StringPtrInput
// Encrypt algorithm of the IPSEC operation specification. Valid values: `3DES-CBC`, `AES-CBC-128`, `AES-CBC-128`,
// `AES-CBC-256`, `DES-CBC`. Default value is `3DES-CBC`.
IpsecEncryptAlgorithm pulumi.StringPtrInput
// Integrity algorithm of the IPSEC operation specification. Valid values: `SHA1`, `MD5`, `SHA-256`. Default value is
// `MD5`.
IpsecIntegrityAlgorithm pulumi.StringPtrInput
// PFS DH group. Valid value: `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`, `NULL`. Default value is `NULL`.
IpsecPfsDhGroup pulumi.StringPtrInput
// SA lifetime of the IPSEC operation specification, unit is second. Valid value ranges: [180~604800]. Default value is
// 3600 seconds.
IpsecSaLifetimeSeconds pulumi.IntPtrInput
// SA lifetime of the IPSEC operation specification, unit is KB. The value should not be less then 2560. Default value is
// 1843200.
IpsecSaLifetimeTraffic pulumi.IntPtrInput
// Indicate whether is ccn type. Modification of this field only impacts force new logic of `vpc_id`. If `is_ccn_type` is
// true, modification of `vpc_id` will be ignored.
IsCcnType pulumi.BoolPtrInput
// Name of the VPN connection. The length of character is limited to 1-60.
Name pulumi.StringPtrInput
// Net status of the VPN connection. Valid value: `AVAILABLE`.
NetStatus pulumi.StringPtrInput
// Pre-shared key of the VPN connection.
PreShareKey pulumi.StringPtrInput
// Route type of the VPN connection.
RouteType pulumi.StringPtrInput
// Security group policy of the VPN connection.
SecurityGroupPolicies ConnectionSecurityGroupPolicyArrayInput
// State of the connection. Valid value: `PENDING`, `AVAILABLE`, `DELETING`.
State pulumi.StringPtrInput
// A list of tags used to associate different resources.
Tags pulumi.MapInput
// ID of the VPC. Required if vpn gateway is not in `CCN` type, and doesn't make sense for `CCN` vpn gateway.
VpcId pulumi.StringPtrInput
// ID of the VPN gateway.
VpnGatewayId pulumi.StringPtrInput
// Vpn proto of the VPN connection.
VpnProto pulumi.StringPtrInput
}
func (ConnectionState) ElementType() reflect.Type {
return reflect.TypeOf((*connectionState)(nil)).Elem()
}
type connectionArgs struct {
// ID of the customer gateway.
CustomerGatewayId string `pulumi:"customerGatewayId"`
// DH group name of the IKE operation specification. Valid values: `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`.
// Default value is `GROUP1`.
IkeDhGroupName *string `pulumi:"ikeDhGroupName"`
// Exchange mode of the IKE operation specification. Valid values: `AGGRESSIVE`, `MAIN`. Default value is `MAIN`.
IkeExchangeMode *string `pulumi:"ikeExchangeMode"`
// Local address of IKE operation specification, valid when ike_local_identity is `ADDRESS`, generally the value is
// `public_ip_address` of the related VPN gateway.
IkeLocalAddress *string `pulumi:"ikeLocalAddress"`
// Local FQDN name of the IKE operation specification.
IkeLocalFqdnName *string `pulumi:"ikeLocalFqdnName"`
// Local identity way of IKE operation specification. Valid values: `ADDRESS`, `FQDN`. Default value is `ADDRESS`.
IkeLocalIdentity *string `pulumi:"ikeLocalIdentity"`
// Proto authenticate algorithm of the IKE operation specification. Valid values: `MD5`, `SHA`, `SHA-256`. Default Value is
// `MD5`.
IkeProtoAuthenAlgorithm *string `pulumi:"ikeProtoAuthenAlgorithm"`
// Proto encrypt algorithm of the IKE operation specification. Valid values: `3DES-CBC`, `AES-CBC-128`, `AES-CBC-128`,
// `AES-CBC-256`, `DES-CBC`. Default value is `3DES-CBC`.
IkeProtoEncryAlgorithm *string `pulumi:"ikeProtoEncryAlgorithm"`
// Remote address of IKE operation specification, valid when ike_remote_identity is `ADDRESS`, generally the value is
// `public_ip_address` of the related customer gateway.
IkeRemoteAddress *string `pulumi:"ikeRemoteAddress"`
// Remote FQDN name of the IKE operation specification.
IkeRemoteFqdnName *string `pulumi:"ikeRemoteFqdnName"`
// Remote identity way of IKE operation specification. Valid values: `ADDRESS`, `FQDN`. Default value is `ADDRESS`.
IkeRemoteIdentity *string `pulumi:"ikeRemoteIdentity"`
// SA lifetime of the IKE operation specification, unit is `second`. The value ranges from 60 to 604800. Default value is
// 86400 seconds.
IkeSaLifetimeSeconds *int `pulumi:"ikeSaLifetimeSeconds"`
// Version of the IKE operation specification. Default value is `IKEV1`.
IkeVersion *string `pulumi:"ikeVersion"`
// Encrypt algorithm of the IPSEC operation specification. Valid values: `3DES-CBC`, `AES-CBC-128`, `AES-CBC-128`,
// `AES-CBC-256`, `DES-CBC`. Default value is `3DES-CBC`.
IpsecEncryptAlgorithm *string `pulumi:"ipsecEncryptAlgorithm"`
// Integrity algorithm of the IPSEC operation specification. Valid values: `SHA1`, `MD5`, `SHA-256`. Default value is
// `MD5`.
IpsecIntegrityAlgorithm *string `pulumi:"ipsecIntegrityAlgorithm"`
// PFS DH group. Valid value: `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`, `NULL`. Default value is `NULL`.
IpsecPfsDhGroup *string `pulumi:"ipsecPfsDhGroup"`
// SA lifetime of the IPSEC operation specification, unit is second. Valid value ranges: [180~604800]. Default value is
// 3600 seconds.
IpsecSaLifetimeSeconds *int `pulumi:"ipsecSaLifetimeSeconds"`
// SA lifetime of the IPSEC operation specification, unit is KB. The value should not be less then 2560. Default value is
// 1843200.
IpsecSaLifetimeTraffic *int `pulumi:"ipsecSaLifetimeTraffic"`
// Name of the VPN connection. The length of character is limited to 1-60.
Name *string `pulumi:"name"`
// Pre-shared key of the VPN connection.
PreShareKey string `pulumi:"preShareKey"`
// Security group policy of the VPN connection.
SecurityGroupPolicies []ConnectionSecurityGroupPolicy `pulumi:"securityGroupPolicies"`
// A list of tags used to associate different resources.
Tags map[string]interface{} `pulumi:"tags"`
// ID of the VPC. Required if vpn gateway is not in `CCN` type, and doesn't make sense for `CCN` vpn gateway.
VpcId *string `pulumi:"vpcId"`
// ID of the VPN gateway.
VpnGatewayId string `pulumi:"vpnGatewayId"`
}
// The set of arguments for constructing a Connection resource.
type ConnectionArgs struct {
// ID of the customer gateway.
CustomerGatewayId pulumi.StringInput
// DH group name of the IKE operation specification. Valid values: `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`.
// Default value is `GROUP1`.
IkeDhGroupName pulumi.StringPtrInput
// Exchange mode of the IKE operation specification. Valid values: `AGGRESSIVE`, `MAIN`. Default value is `MAIN`.
IkeExchangeMode pulumi.StringPtrInput
// Local address of IKE operation specification, valid when ike_local_identity is `ADDRESS`, generally the value is
// `public_ip_address` of the related VPN gateway.
IkeLocalAddress pulumi.StringPtrInput
// Local FQDN name of the IKE operation specification.
IkeLocalFqdnName pulumi.StringPtrInput
// Local identity way of IKE operation specification. Valid values: `ADDRESS`, `FQDN`. Default value is `ADDRESS`.
IkeLocalIdentity pulumi.StringPtrInput
// Proto authenticate algorithm of the IKE operation specification. Valid values: `MD5`, `SHA`, `SHA-256`. Default Value is
// `MD5`.
IkeProtoAuthenAlgorithm pulumi.StringPtrInput
// Proto encrypt algorithm of the IKE operation specification. Valid values: `3DES-CBC`, `AES-CBC-128`, `AES-CBC-128`,
// `AES-CBC-256`, `DES-CBC`. Default value is `3DES-CBC`.
IkeProtoEncryAlgorithm pulumi.StringPtrInput
// Remote address of IKE operation specification, valid when ike_remote_identity is `ADDRESS`, generally the value is
// `public_ip_address` of the related customer gateway.
IkeRemoteAddress pulumi.StringPtrInput
// Remote FQDN name of the IKE operation specification.
IkeRemoteFqdnName pulumi.StringPtrInput
// Remote identity way of IKE operation specification. Valid values: `ADDRESS`, `FQDN`. Default value is `ADDRESS`.
IkeRemoteIdentity pulumi.StringPtrInput
// SA lifetime of the IKE operation specification, unit is `second`. The value ranges from 60 to 604800. Default value is
// 86400 seconds.
IkeSaLifetimeSeconds pulumi.IntPtrInput
// Version of the IKE operation specification. Default value is `IKEV1`.
IkeVersion pulumi.StringPtrInput
// Encrypt algorithm of the IPSEC operation specification. Valid values: `3DES-CBC`, `AES-CBC-128`, `AES-CBC-128`,
// `AES-CBC-256`, `DES-CBC`. Default value is `3DES-CBC`.
IpsecEncryptAlgorithm pulumi.StringPtrInput
// Integrity algorithm of the IPSEC operation specification. Valid values: `SHA1`, `MD5`, `SHA-256`. Default value is
// `MD5`.
IpsecIntegrityAlgorithm pulumi.StringPtrInput
// PFS DH group. Valid value: `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`, `NULL`. Default value is `NULL`.
IpsecPfsDhGroup pulumi.StringPtrInput
// SA lifetime of the IPSEC operation specification, unit is second. Valid value ranges: [180~604800]. Default value is
// 3600 seconds.
IpsecSaLifetimeSeconds pulumi.IntPtrInput
// SA lifetime of the IPSEC operation specification, unit is KB. The value should not be less then 2560. Default value is
// 1843200.
IpsecSaLifetimeTraffic pulumi.IntPtrInput
// Name of the VPN connection. The length of character is limited to 1-60.
Name pulumi.StringPtrInput
// Pre-shared key of the VPN connection.
PreShareKey pulumi.StringInput
// Security group policy of the VPN connection.
SecurityGroupPolicies ConnectionSecurityGroupPolicyArrayInput
// A list of tags used to associate different resources.
Tags pulumi.MapInput
// ID of the VPC. Required if vpn gateway is not in `CCN` type, and doesn't make sense for `CCN` vpn gateway.
VpcId pulumi.StringPtrInput
// ID of the VPN gateway.
VpnGatewayId pulumi.StringInput
}
func (ConnectionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*connectionArgs)(nil)).Elem()
}
type ConnectionInput interface {
pulumi.Input
ToConnectionOutput() ConnectionOutput
ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput
}
func (*Connection) ElementType() reflect.Type {
return reflect.TypeOf((**Connection)(nil)).Elem()
}
func (i *Connection) ToConnectionOutput() ConnectionOutput {
return i.ToConnectionOutputWithContext(context.Background())
}
func (i *Connection) ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionOutput)
}
// ConnectionArrayInput is an input type that accepts ConnectionArray and ConnectionArrayOutput values.
// You can construct a concrete instance of `ConnectionArrayInput` via:
//
// ConnectionArray{ ConnectionArgs{...} }
type ConnectionArrayInput interface {
pulumi.Input
ToConnectionArrayOutput() ConnectionArrayOutput
ToConnectionArrayOutputWithContext(context.Context) ConnectionArrayOutput
}
type ConnectionArray []ConnectionInput
func (ConnectionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Connection)(nil)).Elem()
}
func (i ConnectionArray) ToConnectionArrayOutput() ConnectionArrayOutput {
return i.ToConnectionArrayOutputWithContext(context.Background())
}
func (i ConnectionArray) ToConnectionArrayOutputWithContext(ctx context.Context) ConnectionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionArrayOutput)
}
// ConnectionMapInput is an input type that accepts ConnectionMap and ConnectionMapOutput values.
// You can construct a concrete instance of `ConnectionMapInput` via:
//
// ConnectionMap{ "key": ConnectionArgs{...} }
type ConnectionMapInput interface {
pulumi.Input
ToConnectionMapOutput() ConnectionMapOutput
ToConnectionMapOutputWithContext(context.Context) ConnectionMapOutput
}
type ConnectionMap map[string]ConnectionInput
func (ConnectionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Connection)(nil)).Elem()
}
func (i ConnectionMap) ToConnectionMapOutput() ConnectionMapOutput {
return i.ToConnectionMapOutputWithContext(context.Background())
}
func (i ConnectionMap) ToConnectionMapOutputWithContext(ctx context.Context) ConnectionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionMapOutput)
}
type ConnectionOutput struct{ *pulumi.OutputState }
func (ConnectionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Connection)(nil)).Elem()
}
func (o ConnectionOutput) ToConnectionOutput() ConnectionOutput {
return o
}
func (o ConnectionOutput) ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput {
return o
}
// Create time of the VPN connection.
func (o ConnectionOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// ID of the customer gateway.
func (o ConnectionOutput) CustomerGatewayId() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.CustomerGatewayId }).(pulumi.StringOutput)
}
// Encrypt proto of the VPN connection.
func (o ConnectionOutput) EncryptProto() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.EncryptProto }).(pulumi.StringOutput)
}
// DH group name of the IKE operation specification. Valid values: `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`.
// Default value is `GROUP1`.
func (o ConnectionOutput) IkeDhGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IkeDhGroupName }).(pulumi.StringPtrOutput)
}
// Exchange mode of the IKE operation specification. Valid values: `AGGRESSIVE`, `MAIN`. Default value is `MAIN`.
func (o ConnectionOutput) IkeExchangeMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IkeExchangeMode }).(pulumi.StringPtrOutput)
}
// Local address of IKE operation specification, valid when ike_local_identity is `ADDRESS`, generally the value is
// `public_ip_address` of the related VPN gateway.
func (o ConnectionOutput) IkeLocalAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IkeLocalAddress }).(pulumi.StringPtrOutput)
}
// Local FQDN name of the IKE operation specification.
func (o ConnectionOutput) IkeLocalFqdnName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IkeLocalFqdnName }).(pulumi.StringPtrOutput)
}
// Local identity way of IKE operation specification. Valid values: `ADDRESS`, `FQDN`. Default value is `ADDRESS`.
func (o ConnectionOutput) IkeLocalIdentity() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IkeLocalIdentity }).(pulumi.StringPtrOutput)
}
// Proto authenticate algorithm of the IKE operation specification. Valid values: `MD5`, `SHA`, `SHA-256`. Default Value is
// `MD5`.
func (o ConnectionOutput) IkeProtoAuthenAlgorithm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IkeProtoAuthenAlgorithm }).(pulumi.StringPtrOutput)
}
// Proto encrypt algorithm of the IKE operation specification. Valid values: `3DES-CBC`, `AES-CBC-128`, `AES-CBC-128`,
// `AES-CBC-256`, `DES-CBC`. Default value is `3DES-CBC`.
func (o ConnectionOutput) IkeProtoEncryAlgorithm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IkeProtoEncryAlgorithm }).(pulumi.StringPtrOutput)
}
// Remote address of IKE operation specification, valid when ike_remote_identity is `ADDRESS`, generally the value is
// `public_ip_address` of the related customer gateway.
func (o ConnectionOutput) IkeRemoteAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IkeRemoteAddress }).(pulumi.StringPtrOutput)
}
// Remote FQDN name of the IKE operation specification.
func (o ConnectionOutput) IkeRemoteFqdnName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IkeRemoteFqdnName }).(pulumi.StringPtrOutput)
}
// Remote identity way of IKE operation specification. Valid values: `ADDRESS`, `FQDN`. Default value is `ADDRESS`.
func (o ConnectionOutput) IkeRemoteIdentity() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IkeRemoteIdentity }).(pulumi.StringPtrOutput)
}
// SA lifetime of the IKE operation specification, unit is `second`. The value ranges from 60 to 604800. Default value is
// 86400 seconds.
func (o ConnectionOutput) IkeSaLifetimeSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.IntPtrOutput { return v.IkeSaLifetimeSeconds }).(pulumi.IntPtrOutput)
}
// Version of the IKE operation specification. Default value is `IKEV1`.
func (o ConnectionOutput) IkeVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IkeVersion }).(pulumi.StringPtrOutput)
}
// Encrypt algorithm of the IPSEC operation specification. Valid values: `3DES-CBC`, `AES-CBC-128`, `AES-CBC-128`,
// `AES-CBC-256`, `DES-CBC`. Default value is `3DES-CBC`.
func (o ConnectionOutput) IpsecEncryptAlgorithm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IpsecEncryptAlgorithm }).(pulumi.StringPtrOutput)
}
// Integrity algorithm of the IPSEC operation specification. Valid values: `SHA1`, `MD5`, `SHA-256`. Default value is
// `MD5`.
func (o ConnectionOutput) IpsecIntegrityAlgorithm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IpsecIntegrityAlgorithm }).(pulumi.StringPtrOutput)
}
// PFS DH group. Valid value: `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`, `NULL`. Default value is `NULL`.
func (o ConnectionOutput) IpsecPfsDhGroup() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.IpsecPfsDhGroup }).(pulumi.StringPtrOutput)
}
// SA lifetime of the IPSEC operation specification, unit is second. Valid value ranges: [180~604800]. Default value is
// 3600 seconds.
func (o ConnectionOutput) IpsecSaLifetimeSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.IntPtrOutput { return v.IpsecSaLifetimeSeconds }).(pulumi.IntPtrOutput)
}
// SA lifetime of the IPSEC operation specification, unit is KB. The value should not be less then 2560. Default value is
// 1843200.
func (o ConnectionOutput) IpsecSaLifetimeTraffic() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.IntPtrOutput { return v.IpsecSaLifetimeTraffic }).(pulumi.IntPtrOutput)
}
// Indicate whether is ccn type. Modification of this field only impacts force new logic of `vpc_id`. If `is_ccn_type` is
// true, modification of `vpc_id` will be ignored.
func (o ConnectionOutput) IsCcnType() pulumi.BoolOutput {
return o.ApplyT(func(v *Connection) pulumi.BoolOutput { return v.IsCcnType }).(pulumi.BoolOutput)
}
// Name of the VPN connection. The length of character is limited to 1-60.
func (o ConnectionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Net status of the VPN connection. Valid value: `AVAILABLE`.
func (o ConnectionOutput) NetStatus() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.NetStatus }).(pulumi.StringOutput)
}
// Pre-shared key of the VPN connection.
func (o ConnectionOutput) PreShareKey() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.PreShareKey }).(pulumi.StringOutput)
}
// Route type of the VPN connection.
func (o ConnectionOutput) RouteType() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.RouteType }).(pulumi.StringOutput)
}
// Security group policy of the VPN connection.
func (o ConnectionOutput) SecurityGroupPolicies() ConnectionSecurityGroupPolicyArrayOutput {
return o.ApplyT(func(v *Connection) ConnectionSecurityGroupPolicyArrayOutput { return v.SecurityGroupPolicies }).(ConnectionSecurityGroupPolicyArrayOutput)
}
// State of the connection. Valid value: `PENDING`, `AVAILABLE`, `DELETING`.
func (o ConnectionOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
// A list of tags used to associate different resources.
func (o ConnectionOutput) Tags() pulumi.MapOutput {
return o.ApplyT(func(v *Connection) pulumi.MapOutput { return v.Tags }).(pulumi.MapOutput)
}
// ID of the VPC. Required if vpn gateway is not in `CCN` type, and doesn't make sense for `CCN` vpn gateway.
func (o ConnectionOutput) VpcId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.VpcId }).(pulumi.StringPtrOutput)
}
// ID of the VPN gateway.
func (o ConnectionOutput) VpnGatewayId() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.VpnGatewayId }).(pulumi.StringOutput)
}
// Vpn proto of the VPN connection.
func (o ConnectionOutput) VpnProto() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.VpnProto }).(pulumi.StringOutput)
}
type ConnectionArrayOutput struct{ *pulumi.OutputState }
func (ConnectionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Connection)(nil)).Elem()
}
func (o ConnectionArrayOutput) ToConnectionArrayOutput() ConnectionArrayOutput {
return o
}
func (o ConnectionArrayOutput) ToConnectionArrayOutputWithContext(ctx context.Context) ConnectionArrayOutput {
return o
}
func (o ConnectionArrayOutput) Index(i pulumi.IntInput) ConnectionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Connection {
return vs[0].([]*Connection)[vs[1].(int)]
}).(ConnectionOutput)
}
type ConnectionMapOutput struct{ *pulumi.OutputState }
func (ConnectionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Connection)(nil)).Elem()
}
func (o ConnectionMapOutput) ToConnectionMapOutput() ConnectionMapOutput {
return o
}
func (o ConnectionMapOutput) ToConnectionMapOutputWithContext(ctx context.Context) ConnectionMapOutput {
return o
}
func (o ConnectionMapOutput) MapIndex(k pulumi.StringInput) ConnectionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Connection {
return vs[0].(map[string]*Connection)[vs[1].(string)]
}).(ConnectionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionInput)(nil)).Elem(), &Connection{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionArrayInput)(nil)).Elem(), ConnectionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionMapInput)(nil)).Elem(), ConnectionMap{})
pulumi.RegisterOutputType(ConnectionOutput{})
pulumi.RegisterOutputType(ConnectionArrayOutput{})
pulumi.RegisterOutputType(ConnectionMapOutput{})
}