pulumi-alicloud 3.57.0__py3-none-any.whl → 3.57.0a1717541877__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-alicloud might be problematic. Click here for more details.
- pulumi_alicloud/__init__.py +0 -72
- pulumi_alicloud/cen/get_transit_router_available_resources.py +11 -32
- pulumi_alicloud/cen/outputs.py +1 -23
- pulumi_alicloud/cfg/remediation.py +2 -10
- pulumi_alicloud/clickhouse/db_cluster.py +0 -47
- pulumi_alicloud/cms/__init__.py +0 -1
- pulumi_alicloud/cms/_inputs.py +18 -18
- pulumi_alicloud/cms/alarm.py +26 -38
- pulumi_alicloud/cms/outputs.py +18 -92
- pulumi_alicloud/cs/node_pool.py +7 -7
- pulumi_alicloud/ecs/_inputs.py +14 -10
- pulumi_alicloud/ecs/image_import.py +100 -162
- pulumi_alicloud/ecs/outputs.py +14 -10
- pulumi_alicloud/ecs/security_group_rule.py +2 -2
- pulumi_alicloud/eds/network_package.py +8 -22
- pulumi_alicloud/expressconnect/__init__.py +0 -8
- pulumi_alicloud/expressconnect/_inputs.py +0 -40
- pulumi_alicloud/expressconnect/outputs.py +0 -51
- pulumi_alicloud/gpdb/__init__.py +0 -1
- pulumi_alicloud/gpdb/instance.py +0 -47
- pulumi_alicloud/hbase/get_instance_types.py +2 -2
- pulumi_alicloud/mongodb/instance.py +7 -7
- pulumi_alicloud/oss/bucket_cors.py +4 -8
- pulumi_alicloud/oss/bucket_data_redundancy_transition.py +4 -12
- pulumi_alicloud/oss/bucket_public_access_block.py +4 -12
- pulumi_alicloud/ots/instance.py +7 -7
- pulumi_alicloud/ots/table.py +8 -149
- pulumi_alicloud/pulumi-plugin.json +1 -1
- pulumi_alicloud/sae/load_balancer_internet.py +2 -4
- pulumi_alicloud/sae/load_balancer_intranet.py +2 -4
- pulumi_alicloud/servicemesh/_inputs.py +6 -0
- pulumi_alicloud/servicemesh/outputs.py +6 -0
- pulumi_alicloud/servicemesh/service_mesh.py +2 -2
- pulumi_alicloud/simpleapplicationserver/snapshot.py +2 -10
- pulumi_alicloud/vpc/bgp_peer.py +8 -36
- pulumi_alicloud/vpc/network.py +4 -0
- pulumi_alicloud/vpn/connection.py +0 -220
- pulumi_alicloud/vpn/gateway_vpn_attachment.py +2 -2
- pulumi_alicloud/vpn/ipsec_server.py +12 -20
- pulumi_alicloud/vpn/pbr_route_entry.py +16 -152
- pulumi_alicloud/vpn/route_entry.py +44 -158
- {pulumi_alicloud-3.57.0.dist-info → pulumi_alicloud-3.57.0a1717541877.dist-info}/METADATA +1 -1
- {pulumi_alicloud-3.57.0.dist-info → pulumi_alicloud-3.57.0a1717541877.dist-info}/RECORD +45 -55
- pulumi_alicloud/cms/get_site_monitors.py +0 -243
- pulumi_alicloud/expressconnect/router_express_connect_router.py +0 -458
- pulumi_alicloud/expressconnect/router_tr_association.py +0 -578
- pulumi_alicloud/expressconnect/router_vbr_child_instance.py +0 -475
- pulumi_alicloud/expressconnect/router_vpc_association.py +0 -500
- pulumi_alicloud/expressconnect/traffic_qos.py +0 -284
- pulumi_alicloud/expressconnect/traffic_qos_association.py +0 -336
- pulumi_alicloud/expressconnect/traffic_qos_queue.py +0 -520
- pulumi_alicloud/expressconnect/traffic_qos_rule.py +0 -1174
- pulumi_alicloud/gpdb/db_resource_group.py +0 -364
- {pulumi_alicloud-3.57.0.dist-info → pulumi_alicloud-3.57.0a1717541877.dist-info}/WHEEL +0 -0
- {pulumi_alicloud-3.57.0.dist-info → pulumi_alicloud-3.57.0a1717541877.dist-info}/top_level.txt +0 -0
pulumi_alicloud/vpc/bgp_peer.py
CHANGED
|
@@ -103,7 +103,6 @@ class _BgpPeerState:
|
|
|
103
103
|
def __init__(__self__, *,
|
|
104
104
|
bfd_multi_hop: Optional[pulumi.Input[int]] = None,
|
|
105
105
|
bgp_group_id: Optional[pulumi.Input[str]] = None,
|
|
106
|
-
bgp_peer_name: Optional[pulumi.Input[str]] = None,
|
|
107
106
|
enable_bfd: Optional[pulumi.Input[bool]] = None,
|
|
108
107
|
ip_version: Optional[pulumi.Input[str]] = None,
|
|
109
108
|
peer_ip_address: Optional[pulumi.Input[str]] = None,
|
|
@@ -112,18 +111,15 @@ class _BgpPeerState:
|
|
|
112
111
|
Input properties used for looking up and filtering BgpPeer resources.
|
|
113
112
|
:param pulumi.Input[int] bfd_multi_hop: The BFD hop count. Valid values: `1` to `255`. **NOTE:** The attribute is valid when the attribute `enable_bfd` is `true`. The parameter specifies the maximum number of network devices that a packet can traverse from the source to the destination. You can set a proper value based on the factors that affect the physical connection.
|
|
114
113
|
:param pulumi.Input[str] bgp_group_id: The ID of the BGP group.
|
|
115
|
-
:param pulumi.Input[str] bgp_peer_name: The name of the BGP neighbor.
|
|
116
114
|
:param pulumi.Input[bool] enable_bfd: Specifies whether to enable the Bidirectional Forwarding Detection (BFD) feature.
|
|
117
115
|
:param pulumi.Input[str] ip_version: The IP version.
|
|
118
116
|
:param pulumi.Input[str] peer_ip_address: The IP address of the BGP peer.
|
|
119
|
-
:param pulumi.Input[str] status:
|
|
117
|
+
:param pulumi.Input[str] status: The status of the BGP peer.
|
|
120
118
|
"""
|
|
121
119
|
if bfd_multi_hop is not None:
|
|
122
120
|
pulumi.set(__self__, "bfd_multi_hop", bfd_multi_hop)
|
|
123
121
|
if bgp_group_id is not None:
|
|
124
122
|
pulumi.set(__self__, "bgp_group_id", bgp_group_id)
|
|
125
|
-
if bgp_peer_name is not None:
|
|
126
|
-
pulumi.set(__self__, "bgp_peer_name", bgp_peer_name)
|
|
127
123
|
if enable_bfd is not None:
|
|
128
124
|
pulumi.set(__self__, "enable_bfd", enable_bfd)
|
|
129
125
|
if ip_version is not None:
|
|
@@ -157,18 +153,6 @@ class _BgpPeerState:
|
|
|
157
153
|
def bgp_group_id(self, value: Optional[pulumi.Input[str]]):
|
|
158
154
|
pulumi.set(self, "bgp_group_id", value)
|
|
159
155
|
|
|
160
|
-
@property
|
|
161
|
-
@pulumi.getter(name="bgpPeerName")
|
|
162
|
-
def bgp_peer_name(self) -> Optional[pulumi.Input[str]]:
|
|
163
|
-
"""
|
|
164
|
-
The name of the BGP neighbor.
|
|
165
|
-
"""
|
|
166
|
-
return pulumi.get(self, "bgp_peer_name")
|
|
167
|
-
|
|
168
|
-
@bgp_peer_name.setter
|
|
169
|
-
def bgp_peer_name(self, value: Optional[pulumi.Input[str]]):
|
|
170
|
-
pulumi.set(self, "bgp_peer_name", value)
|
|
171
|
-
|
|
172
156
|
@property
|
|
173
157
|
@pulumi.getter(name="enableBfd")
|
|
174
158
|
def enable_bfd(self) -> Optional[pulumi.Input[bool]]:
|
|
@@ -209,7 +193,7 @@ class _BgpPeerState:
|
|
|
209
193
|
@pulumi.getter
|
|
210
194
|
def status(self) -> Optional[pulumi.Input[str]]:
|
|
211
195
|
"""
|
|
212
|
-
|
|
196
|
+
The status of the BGP peer.
|
|
213
197
|
"""
|
|
214
198
|
return pulumi.get(self, "status")
|
|
215
199
|
|
|
@@ -230,7 +214,7 @@ class BgpPeer(pulumi.CustomResource):
|
|
|
230
214
|
peer_ip_address: Optional[pulumi.Input[str]] = None,
|
|
231
215
|
__props__=None):
|
|
232
216
|
"""
|
|
233
|
-
Provides a
|
|
217
|
+
Provides a VPC Bgp Peer resource.
|
|
234
218
|
|
|
235
219
|
For information about VPC Bgp Peer and how to use it, see [What is Bgp Peer](https://www.alibabacloud.com/help/en/doc-detail/91267.html).
|
|
236
220
|
|
|
@@ -280,7 +264,7 @@ class BgpPeer(pulumi.CustomResource):
|
|
|
280
264
|
|
|
281
265
|
## Import
|
|
282
266
|
|
|
283
|
-
|
|
267
|
+
VPC Bgp Peer can be imported using the id, e.g.
|
|
284
268
|
|
|
285
269
|
```sh
|
|
286
270
|
$ pulumi import alicloud:vpc/bgpPeer:BgpPeer example <id>
|
|
@@ -301,7 +285,7 @@ class BgpPeer(pulumi.CustomResource):
|
|
|
301
285
|
args: BgpPeerArgs,
|
|
302
286
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
303
287
|
"""
|
|
304
|
-
Provides a
|
|
288
|
+
Provides a VPC Bgp Peer resource.
|
|
305
289
|
|
|
306
290
|
For information about VPC Bgp Peer and how to use it, see [What is Bgp Peer](https://www.alibabacloud.com/help/en/doc-detail/91267.html).
|
|
307
291
|
|
|
@@ -351,7 +335,7 @@ class BgpPeer(pulumi.CustomResource):
|
|
|
351
335
|
|
|
352
336
|
## Import
|
|
353
337
|
|
|
354
|
-
|
|
338
|
+
VPC Bgp Peer can be imported using the id, e.g.
|
|
355
339
|
|
|
356
340
|
```sh
|
|
357
341
|
$ pulumi import alicloud:vpc/bgpPeer:BgpPeer example <id>
|
|
@@ -393,7 +377,6 @@ class BgpPeer(pulumi.CustomResource):
|
|
|
393
377
|
__props__.__dict__["enable_bfd"] = enable_bfd
|
|
394
378
|
__props__.__dict__["ip_version"] = ip_version
|
|
395
379
|
__props__.__dict__["peer_ip_address"] = peer_ip_address
|
|
396
|
-
__props__.__dict__["bgp_peer_name"] = None
|
|
397
380
|
__props__.__dict__["status"] = None
|
|
398
381
|
super(BgpPeer, __self__).__init__(
|
|
399
382
|
'alicloud:vpc/bgpPeer:BgpPeer',
|
|
@@ -407,7 +390,6 @@ class BgpPeer(pulumi.CustomResource):
|
|
|
407
390
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
408
391
|
bfd_multi_hop: Optional[pulumi.Input[int]] = None,
|
|
409
392
|
bgp_group_id: Optional[pulumi.Input[str]] = None,
|
|
410
|
-
bgp_peer_name: Optional[pulumi.Input[str]] = None,
|
|
411
393
|
enable_bfd: Optional[pulumi.Input[bool]] = None,
|
|
412
394
|
ip_version: Optional[pulumi.Input[str]] = None,
|
|
413
395
|
peer_ip_address: Optional[pulumi.Input[str]] = None,
|
|
@@ -421,11 +403,10 @@ class BgpPeer(pulumi.CustomResource):
|
|
|
421
403
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
422
404
|
:param pulumi.Input[int] bfd_multi_hop: The BFD hop count. Valid values: `1` to `255`. **NOTE:** The attribute is valid when the attribute `enable_bfd` is `true`. The parameter specifies the maximum number of network devices that a packet can traverse from the source to the destination. You can set a proper value based on the factors that affect the physical connection.
|
|
423
405
|
:param pulumi.Input[str] bgp_group_id: The ID of the BGP group.
|
|
424
|
-
:param pulumi.Input[str] bgp_peer_name: The name of the BGP neighbor.
|
|
425
406
|
:param pulumi.Input[bool] enable_bfd: Specifies whether to enable the Bidirectional Forwarding Detection (BFD) feature.
|
|
426
407
|
:param pulumi.Input[str] ip_version: The IP version.
|
|
427
408
|
:param pulumi.Input[str] peer_ip_address: The IP address of the BGP peer.
|
|
428
|
-
:param pulumi.Input[str] status:
|
|
409
|
+
:param pulumi.Input[str] status: The status of the BGP peer.
|
|
429
410
|
"""
|
|
430
411
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
431
412
|
|
|
@@ -433,7 +414,6 @@ class BgpPeer(pulumi.CustomResource):
|
|
|
433
414
|
|
|
434
415
|
__props__.__dict__["bfd_multi_hop"] = bfd_multi_hop
|
|
435
416
|
__props__.__dict__["bgp_group_id"] = bgp_group_id
|
|
436
|
-
__props__.__dict__["bgp_peer_name"] = bgp_peer_name
|
|
437
417
|
__props__.__dict__["enable_bfd"] = enable_bfd
|
|
438
418
|
__props__.__dict__["ip_version"] = ip_version
|
|
439
419
|
__props__.__dict__["peer_ip_address"] = peer_ip_address
|
|
@@ -456,14 +436,6 @@ class BgpPeer(pulumi.CustomResource):
|
|
|
456
436
|
"""
|
|
457
437
|
return pulumi.get(self, "bgp_group_id")
|
|
458
438
|
|
|
459
|
-
@property
|
|
460
|
-
@pulumi.getter(name="bgpPeerName")
|
|
461
|
-
def bgp_peer_name(self) -> pulumi.Output[str]:
|
|
462
|
-
"""
|
|
463
|
-
The name of the BGP neighbor.
|
|
464
|
-
"""
|
|
465
|
-
return pulumi.get(self, "bgp_peer_name")
|
|
466
|
-
|
|
467
439
|
@property
|
|
468
440
|
@pulumi.getter(name="enableBfd")
|
|
469
441
|
def enable_bfd(self) -> pulumi.Output[Optional[bool]]:
|
|
@@ -492,7 +464,7 @@ class BgpPeer(pulumi.CustomResource):
|
|
|
492
464
|
@pulumi.getter
|
|
493
465
|
def status(self) -> pulumi.Output[str]:
|
|
494
466
|
"""
|
|
495
|
-
|
|
467
|
+
The status of the BGP peer.
|
|
496
468
|
"""
|
|
497
469
|
return pulumi.get(self, "status")
|
|
498
470
|
|
pulumi_alicloud/vpc/network.py
CHANGED
|
@@ -649,6 +649,8 @@ class Network(pulumi.CustomResource):
|
|
|
649
649
|
|
|
650
650
|
> **NOTE:** This resource will auto build a router and a route table while it uses `vpc.Network` to build a vpc resource.
|
|
651
651
|
|
|
652
|
+
> **NOTE:** Currently, the IPv4 / IPv6 dual-stack VPC function is under public testing. Only the following regions support IPv4 / IPv6 dual-stack VPC: `cn-hangzhou`, `cn-shanghai`, `cn-shenzhen`, `cn-beijing`, `cn-huhehaote`, `cn-hongkong` and `ap-southeast-1`, and need to apply for public beta qualification. To use, please [submit an application](https://www.alibabacloud.com/help/en/vpc/getting-started/create-a-vpc-with-an-ipv6-cidr-block).
|
|
653
|
+
|
|
652
654
|
## Module Support
|
|
653
655
|
|
|
654
656
|
You can use the existing vpc module
|
|
@@ -723,6 +725,8 @@ class Network(pulumi.CustomResource):
|
|
|
723
725
|
|
|
724
726
|
> **NOTE:** This resource will auto build a router and a route table while it uses `vpc.Network` to build a vpc resource.
|
|
725
727
|
|
|
728
|
+
> **NOTE:** Currently, the IPv4 / IPv6 dual-stack VPC function is under public testing. Only the following regions support IPv4 / IPv6 dual-stack VPC: `cn-hangzhou`, `cn-shanghai`, `cn-shenzhen`, `cn-beijing`, `cn-huhehaote`, `cn-hongkong` and `ap-southeast-1`, and need to apply for public beta qualification. To use, please [submit an application](https://www.alibabacloud.com/help/en/vpc/getting-started/create-a-vpc-with-an-ipv6-cidr-block).
|
|
729
|
+
|
|
726
730
|
## Module Support
|
|
727
731
|
|
|
728
732
|
You can use the existing vpc module
|
|
@@ -715,116 +715,6 @@ class Connection(pulumi.CustomResource):
|
|
|
715
715
|
|
|
716
716
|
Basic Usage
|
|
717
717
|
|
|
718
|
-
[IPsec-VPN connections support the dual-tunnel mode](https://www.alibabacloud.com/help/en/vpn/product-overview/ipsec-vpn-connections-support-the-dual-tunnel-mode)
|
|
719
|
-
|
|
720
|
-
```python
|
|
721
|
-
import pulumi
|
|
722
|
-
import pulumi_alicloud as alicloud
|
|
723
|
-
|
|
724
|
-
config = pulumi.Config()
|
|
725
|
-
name = config.get("name")
|
|
726
|
-
if name is None:
|
|
727
|
-
name = "terraform-example"
|
|
728
|
-
spec = config.get("spec")
|
|
729
|
-
if spec is None:
|
|
730
|
-
spec = "5"
|
|
731
|
-
default = alicloud.vpn.get_gateway_zones(spec="5M")
|
|
732
|
-
default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$",
|
|
733
|
-
cidr_block="172.16.0.0/16")
|
|
734
|
-
default0 = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
|
|
735
|
-
zone_id=default.ids[0])
|
|
736
|
-
default1 = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
|
|
737
|
-
zone_id=default.ids[1])
|
|
738
|
-
h_a__vpn = alicloud.vpn.Gateway("HA-VPN",
|
|
739
|
-
vpn_type="Normal",
|
|
740
|
-
disaster_recovery_vswitch_id=default1.ids[0],
|
|
741
|
-
vpn_gateway_name=name,
|
|
742
|
-
vswitch_id=default0.ids[0],
|
|
743
|
-
auto_pay=True,
|
|
744
|
-
vpc_id=default_get_networks.ids[0],
|
|
745
|
-
network_type="public",
|
|
746
|
-
payment_type="Subscription",
|
|
747
|
-
enable_ipsec=True,
|
|
748
|
-
bandwidth=spec)
|
|
749
|
-
default_customer_gateway = alicloud.vpn.CustomerGateway("defaultCustomerGateway",
|
|
750
|
-
description="defaultCustomerGateway",
|
|
751
|
-
ip_address="2.2.2.5",
|
|
752
|
-
asn="2224",
|
|
753
|
-
customer_gateway_name=name)
|
|
754
|
-
change_customer_gateway = alicloud.vpn.CustomerGateway("changeCustomerGateway",
|
|
755
|
-
description="changeCustomerGateway",
|
|
756
|
-
ip_address="2.2.2.6",
|
|
757
|
-
asn="2225",
|
|
758
|
-
customer_gateway_name=name)
|
|
759
|
-
default_connection = alicloud.vpn.Connection("default",
|
|
760
|
-
vpn_gateway_id=h_a__vpn.id,
|
|
761
|
-
vpn_connection_name=name,
|
|
762
|
-
local_subnets=["3.0.0.0/24"],
|
|
763
|
-
remote_subnets=[
|
|
764
|
-
"10.0.0.0/24",
|
|
765
|
-
"10.0.1.0/24",
|
|
766
|
-
],
|
|
767
|
-
tags={
|
|
768
|
-
"Created": "TF",
|
|
769
|
-
"For": "example",
|
|
770
|
-
},
|
|
771
|
-
enable_tunnels_bgp=True,
|
|
772
|
-
tunnel_options_specifications=[
|
|
773
|
-
alicloud.vpn.ConnectionTunnelOptionsSpecificationArgs(
|
|
774
|
-
tunnel_ipsec_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs(
|
|
775
|
-
ipsec_auth_alg="md5",
|
|
776
|
-
ipsec_enc_alg="aes256",
|
|
777
|
-
ipsec_lifetime=16400,
|
|
778
|
-
ipsec_pfs="group5",
|
|
779
|
-
),
|
|
780
|
-
customer_gateway_id=default_customer_gateway.id,
|
|
781
|
-
role="master",
|
|
782
|
-
tunnel_bgp_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs(
|
|
783
|
-
local_asn="1219002",
|
|
784
|
-
tunnel_cidr="169.254.30.0/30",
|
|
785
|
-
local_bgp_ip="169.254.30.1",
|
|
786
|
-
),
|
|
787
|
-
tunnel_ike_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs(
|
|
788
|
-
ike_mode="aggressive",
|
|
789
|
-
ike_version="ikev2",
|
|
790
|
-
local_id="localid_tunnel2",
|
|
791
|
-
psk="12345678",
|
|
792
|
-
remote_id="remote2",
|
|
793
|
-
ike_auth_alg="md5",
|
|
794
|
-
ike_enc_alg="aes256",
|
|
795
|
-
ike_lifetime=3600,
|
|
796
|
-
ike_pfs="group14",
|
|
797
|
-
),
|
|
798
|
-
),
|
|
799
|
-
alicloud.vpn.ConnectionTunnelOptionsSpecificationArgs(
|
|
800
|
-
tunnel_ike_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs(
|
|
801
|
-
remote_id="remote24",
|
|
802
|
-
ike_enc_alg="aes256",
|
|
803
|
-
ike_lifetime=27000,
|
|
804
|
-
ike_mode="aggressive",
|
|
805
|
-
ike_pfs="group5",
|
|
806
|
-
ike_auth_alg="md5",
|
|
807
|
-
ike_version="ikev2",
|
|
808
|
-
local_id="localid_tunnel2",
|
|
809
|
-
psk="12345678",
|
|
810
|
-
),
|
|
811
|
-
tunnel_ipsec_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs(
|
|
812
|
-
ipsec_lifetime=2700,
|
|
813
|
-
ipsec_pfs="group14",
|
|
814
|
-
ipsec_auth_alg="md5",
|
|
815
|
-
ipsec_enc_alg="aes256",
|
|
816
|
-
),
|
|
817
|
-
customer_gateway_id=default_customer_gateway.id,
|
|
818
|
-
role="slave",
|
|
819
|
-
tunnel_bgp_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs(
|
|
820
|
-
local_asn="1219002",
|
|
821
|
-
local_bgp_ip="169.254.40.1",
|
|
822
|
-
tunnel_cidr="169.254.40.0/30",
|
|
823
|
-
),
|
|
824
|
-
),
|
|
825
|
-
])
|
|
826
|
-
```
|
|
827
|
-
|
|
828
718
|
## Import
|
|
829
719
|
|
|
830
720
|
VPN connection can be imported using the id, e.g.
|
|
@@ -871,116 +761,6 @@ class Connection(pulumi.CustomResource):
|
|
|
871
761
|
|
|
872
762
|
Basic Usage
|
|
873
763
|
|
|
874
|
-
[IPsec-VPN connections support the dual-tunnel mode](https://www.alibabacloud.com/help/en/vpn/product-overview/ipsec-vpn-connections-support-the-dual-tunnel-mode)
|
|
875
|
-
|
|
876
|
-
```python
|
|
877
|
-
import pulumi
|
|
878
|
-
import pulumi_alicloud as alicloud
|
|
879
|
-
|
|
880
|
-
config = pulumi.Config()
|
|
881
|
-
name = config.get("name")
|
|
882
|
-
if name is None:
|
|
883
|
-
name = "terraform-example"
|
|
884
|
-
spec = config.get("spec")
|
|
885
|
-
if spec is None:
|
|
886
|
-
spec = "5"
|
|
887
|
-
default = alicloud.vpn.get_gateway_zones(spec="5M")
|
|
888
|
-
default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$",
|
|
889
|
-
cidr_block="172.16.0.0/16")
|
|
890
|
-
default0 = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
|
|
891
|
-
zone_id=default.ids[0])
|
|
892
|
-
default1 = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
|
|
893
|
-
zone_id=default.ids[1])
|
|
894
|
-
h_a__vpn = alicloud.vpn.Gateway("HA-VPN",
|
|
895
|
-
vpn_type="Normal",
|
|
896
|
-
disaster_recovery_vswitch_id=default1.ids[0],
|
|
897
|
-
vpn_gateway_name=name,
|
|
898
|
-
vswitch_id=default0.ids[0],
|
|
899
|
-
auto_pay=True,
|
|
900
|
-
vpc_id=default_get_networks.ids[0],
|
|
901
|
-
network_type="public",
|
|
902
|
-
payment_type="Subscription",
|
|
903
|
-
enable_ipsec=True,
|
|
904
|
-
bandwidth=spec)
|
|
905
|
-
default_customer_gateway = alicloud.vpn.CustomerGateway("defaultCustomerGateway",
|
|
906
|
-
description="defaultCustomerGateway",
|
|
907
|
-
ip_address="2.2.2.5",
|
|
908
|
-
asn="2224",
|
|
909
|
-
customer_gateway_name=name)
|
|
910
|
-
change_customer_gateway = alicloud.vpn.CustomerGateway("changeCustomerGateway",
|
|
911
|
-
description="changeCustomerGateway",
|
|
912
|
-
ip_address="2.2.2.6",
|
|
913
|
-
asn="2225",
|
|
914
|
-
customer_gateway_name=name)
|
|
915
|
-
default_connection = alicloud.vpn.Connection("default",
|
|
916
|
-
vpn_gateway_id=h_a__vpn.id,
|
|
917
|
-
vpn_connection_name=name,
|
|
918
|
-
local_subnets=["3.0.0.0/24"],
|
|
919
|
-
remote_subnets=[
|
|
920
|
-
"10.0.0.0/24",
|
|
921
|
-
"10.0.1.0/24",
|
|
922
|
-
],
|
|
923
|
-
tags={
|
|
924
|
-
"Created": "TF",
|
|
925
|
-
"For": "example",
|
|
926
|
-
},
|
|
927
|
-
enable_tunnels_bgp=True,
|
|
928
|
-
tunnel_options_specifications=[
|
|
929
|
-
alicloud.vpn.ConnectionTunnelOptionsSpecificationArgs(
|
|
930
|
-
tunnel_ipsec_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs(
|
|
931
|
-
ipsec_auth_alg="md5",
|
|
932
|
-
ipsec_enc_alg="aes256",
|
|
933
|
-
ipsec_lifetime=16400,
|
|
934
|
-
ipsec_pfs="group5",
|
|
935
|
-
),
|
|
936
|
-
customer_gateway_id=default_customer_gateway.id,
|
|
937
|
-
role="master",
|
|
938
|
-
tunnel_bgp_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs(
|
|
939
|
-
local_asn="1219002",
|
|
940
|
-
tunnel_cidr="169.254.30.0/30",
|
|
941
|
-
local_bgp_ip="169.254.30.1",
|
|
942
|
-
),
|
|
943
|
-
tunnel_ike_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs(
|
|
944
|
-
ike_mode="aggressive",
|
|
945
|
-
ike_version="ikev2",
|
|
946
|
-
local_id="localid_tunnel2",
|
|
947
|
-
psk="12345678",
|
|
948
|
-
remote_id="remote2",
|
|
949
|
-
ike_auth_alg="md5",
|
|
950
|
-
ike_enc_alg="aes256",
|
|
951
|
-
ike_lifetime=3600,
|
|
952
|
-
ike_pfs="group14",
|
|
953
|
-
),
|
|
954
|
-
),
|
|
955
|
-
alicloud.vpn.ConnectionTunnelOptionsSpecificationArgs(
|
|
956
|
-
tunnel_ike_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs(
|
|
957
|
-
remote_id="remote24",
|
|
958
|
-
ike_enc_alg="aes256",
|
|
959
|
-
ike_lifetime=27000,
|
|
960
|
-
ike_mode="aggressive",
|
|
961
|
-
ike_pfs="group5",
|
|
962
|
-
ike_auth_alg="md5",
|
|
963
|
-
ike_version="ikev2",
|
|
964
|
-
local_id="localid_tunnel2",
|
|
965
|
-
psk="12345678",
|
|
966
|
-
),
|
|
967
|
-
tunnel_ipsec_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs(
|
|
968
|
-
ipsec_lifetime=2700,
|
|
969
|
-
ipsec_pfs="group14",
|
|
970
|
-
ipsec_auth_alg="md5",
|
|
971
|
-
ipsec_enc_alg="aes256",
|
|
972
|
-
),
|
|
973
|
-
customer_gateway_id=default_customer_gateway.id,
|
|
974
|
-
role="slave",
|
|
975
|
-
tunnel_bgp_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs(
|
|
976
|
-
local_asn="1219002",
|
|
977
|
-
local_bgp_ip="169.254.40.1",
|
|
978
|
-
tunnel_cidr="169.254.40.0/30",
|
|
979
|
-
),
|
|
980
|
-
),
|
|
981
|
-
])
|
|
982
|
-
```
|
|
983
|
-
|
|
984
764
|
## Import
|
|
985
765
|
|
|
986
766
|
VPN connection can be imported using the id, e.g.
|
|
@@ -480,7 +480,7 @@ class GatewayVpnAttachment(pulumi.CustomResource):
|
|
|
480
480
|
if name is None:
|
|
481
481
|
name = "tf-example"
|
|
482
482
|
default = alicloud.vpn.CustomerGateway("default",
|
|
483
|
-
|
|
483
|
+
name=name,
|
|
484
484
|
ip_address="42.104.22.210",
|
|
485
485
|
asn="45014",
|
|
486
486
|
description=name)
|
|
@@ -575,7 +575,7 @@ class GatewayVpnAttachment(pulumi.CustomResource):
|
|
|
575
575
|
if name is None:
|
|
576
576
|
name = "tf-example"
|
|
577
577
|
default = alicloud.vpn.CustomerGateway("default",
|
|
578
|
-
|
|
578
|
+
name=name,
|
|
579
579
|
ip_address="42.104.22.210",
|
|
580
580
|
asn="45014",
|
|
581
581
|
description=name)
|
|
@@ -380,23 +380,19 @@ class IpsecServer(pulumi.CustomResource):
|
|
|
380
380
|
config = pulumi.Config()
|
|
381
381
|
name = config.get("name")
|
|
382
382
|
if name is None:
|
|
383
|
-
name = "
|
|
383
|
+
name = "tf-example"
|
|
384
384
|
default = alicloud.get_zones(available_resource_creation="VSwitch")
|
|
385
|
-
default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$"
|
|
386
|
-
|
|
387
|
-
default0 = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
|
|
385
|
+
default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
|
|
386
|
+
default_get_switches = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
|
|
388
387
|
zone_id=default.ids[0])
|
|
389
|
-
default1 = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
|
|
390
|
-
zone_id=default.ids[1])
|
|
391
388
|
default_gateway = alicloud.vpn.Gateway("default",
|
|
392
|
-
|
|
389
|
+
name=name,
|
|
393
390
|
vpc_id=default_get_networks.ids[0],
|
|
394
391
|
bandwidth=10,
|
|
395
392
|
enable_ssl=True,
|
|
396
393
|
description=name,
|
|
397
|
-
|
|
398
|
-
vswitch_id=
|
|
399
|
-
disaster_recovery_vswitch_id=default1.ids[0])
|
|
394
|
+
instance_charge_type="PrePaid",
|
|
395
|
+
vswitch_id=default_get_switches.ids[0])
|
|
400
396
|
foo = alicloud.vpn.IpsecServer("foo",
|
|
401
397
|
client_ip_pool="10.0.0.0/24",
|
|
402
398
|
ipsec_server_name=name,
|
|
@@ -450,23 +446,19 @@ class IpsecServer(pulumi.CustomResource):
|
|
|
450
446
|
config = pulumi.Config()
|
|
451
447
|
name = config.get("name")
|
|
452
448
|
if name is None:
|
|
453
|
-
name = "
|
|
449
|
+
name = "tf-example"
|
|
454
450
|
default = alicloud.get_zones(available_resource_creation="VSwitch")
|
|
455
|
-
default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$"
|
|
456
|
-
|
|
457
|
-
default0 = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
|
|
451
|
+
default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
|
|
452
|
+
default_get_switches = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
|
|
458
453
|
zone_id=default.ids[0])
|
|
459
|
-
default1 = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
|
|
460
|
-
zone_id=default.ids[1])
|
|
461
454
|
default_gateway = alicloud.vpn.Gateway("default",
|
|
462
|
-
|
|
455
|
+
name=name,
|
|
463
456
|
vpc_id=default_get_networks.ids[0],
|
|
464
457
|
bandwidth=10,
|
|
465
458
|
enable_ssl=True,
|
|
466
459
|
description=name,
|
|
467
|
-
|
|
468
|
-
vswitch_id=
|
|
469
|
-
disaster_recovery_vswitch_id=default1.ids[0])
|
|
460
|
+
instance_charge_type="PrePaid",
|
|
461
|
+
vswitch_id=default_get_switches.ids[0])
|
|
470
462
|
foo = alicloud.vpn.IpsecServer("foo",
|
|
471
463
|
client_ip_pool="10.0.0.0/24",
|
|
472
464
|
ipsec_server_name=name,
|
|
@@ -259,85 +259,17 @@ class PbrRouteEntry(pulumi.CustomResource):
|
|
|
259
259
|
config = pulumi.Config()
|
|
260
260
|
name = config.get("name")
|
|
261
261
|
if name is None:
|
|
262
|
-
name = "
|
|
262
|
+
name = "tfacc"
|
|
263
263
|
default = alicloud.vpn.get_gateways()
|
|
264
|
-
default_customer_gateway = alicloud.vpn.CustomerGateway("
|
|
265
|
-
|
|
266
|
-
ip_address="
|
|
267
|
-
asn="2224",
|
|
268
|
-
customer_gateway_name=name)
|
|
269
|
-
change_customer_gateway = alicloud.vpn.CustomerGateway("changeCustomerGateway",
|
|
270
|
-
description="changeCustomerGateway",
|
|
271
|
-
ip_address="2.2.2.6",
|
|
272
|
-
asn="2225",
|
|
273
|
-
customer_gateway_name=name)
|
|
264
|
+
default_customer_gateway = alicloud.vpn.CustomerGateway("default",
|
|
265
|
+
name=name,
|
|
266
|
+
ip_address="192.168.1.1")
|
|
274
267
|
default_connection = alicloud.vpn.Connection("default",
|
|
268
|
+
name=name,
|
|
269
|
+
customer_gateway_id=default_customer_gateway.id,
|
|
275
270
|
vpn_gateway_id=default.ids[0],
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
remote_subnets=[
|
|
279
|
-
"10.0.0.0/24",
|
|
280
|
-
"10.0.1.0/24",
|
|
281
|
-
],
|
|
282
|
-
tags={
|
|
283
|
-
"Created": "TF",
|
|
284
|
-
"For": "example",
|
|
285
|
-
},
|
|
286
|
-
enable_tunnels_bgp=True,
|
|
287
|
-
tunnel_options_specifications=[
|
|
288
|
-
alicloud.vpn.ConnectionTunnelOptionsSpecificationArgs(
|
|
289
|
-
tunnel_ipsec_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs(
|
|
290
|
-
ipsec_auth_alg="md5",
|
|
291
|
-
ipsec_enc_alg="aes256",
|
|
292
|
-
ipsec_lifetime=16400,
|
|
293
|
-
ipsec_pfs="group5",
|
|
294
|
-
),
|
|
295
|
-
customer_gateway_id=default_customer_gateway.id,
|
|
296
|
-
role="master",
|
|
297
|
-
tunnel_bgp_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs(
|
|
298
|
-
local_asn="1219002",
|
|
299
|
-
tunnel_cidr="169.254.30.0/30",
|
|
300
|
-
local_bgp_ip="169.254.30.1",
|
|
301
|
-
),
|
|
302
|
-
tunnel_ike_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs(
|
|
303
|
-
ike_mode="aggressive",
|
|
304
|
-
ike_version="ikev2",
|
|
305
|
-
local_id="localid_tunnel2",
|
|
306
|
-
psk="12345678",
|
|
307
|
-
remote_id="remote2",
|
|
308
|
-
ike_auth_alg="md5",
|
|
309
|
-
ike_enc_alg="aes256",
|
|
310
|
-
ike_lifetime=3600,
|
|
311
|
-
ike_pfs="group14",
|
|
312
|
-
),
|
|
313
|
-
),
|
|
314
|
-
alicloud.vpn.ConnectionTunnelOptionsSpecificationArgs(
|
|
315
|
-
tunnel_ike_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs(
|
|
316
|
-
remote_id="remote24",
|
|
317
|
-
ike_enc_alg="aes256",
|
|
318
|
-
ike_lifetime=27000,
|
|
319
|
-
ike_mode="aggressive",
|
|
320
|
-
ike_pfs="group5",
|
|
321
|
-
ike_auth_alg="md5",
|
|
322
|
-
ike_version="ikev2",
|
|
323
|
-
local_id="localid_tunnel2",
|
|
324
|
-
psk="12345678",
|
|
325
|
-
),
|
|
326
|
-
tunnel_ipsec_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs(
|
|
327
|
-
ipsec_lifetime=2700,
|
|
328
|
-
ipsec_pfs="group14",
|
|
329
|
-
ipsec_auth_alg="md5",
|
|
330
|
-
ipsec_enc_alg="aes256",
|
|
331
|
-
),
|
|
332
|
-
customer_gateway_id=default_customer_gateway.id,
|
|
333
|
-
role="slave",
|
|
334
|
-
tunnel_bgp_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs(
|
|
335
|
-
local_asn="1219002",
|
|
336
|
-
local_bgp_ip="169.254.40.1",
|
|
337
|
-
tunnel_cidr="169.254.40.0/30",
|
|
338
|
-
),
|
|
339
|
-
),
|
|
340
|
-
])
|
|
271
|
+
local_subnets=["192.168.2.0/24"],
|
|
272
|
+
remote_subnets=["192.168.3.0/24"])
|
|
341
273
|
default_pbr_route_entry = alicloud.vpn.PbrRouteEntry("default",
|
|
342
274
|
vpn_gateway_id=default.ids[0],
|
|
343
275
|
route_source="192.168.1.0/24",
|
|
@@ -388,85 +320,17 @@ class PbrRouteEntry(pulumi.CustomResource):
|
|
|
388
320
|
config = pulumi.Config()
|
|
389
321
|
name = config.get("name")
|
|
390
322
|
if name is None:
|
|
391
|
-
name = "
|
|
323
|
+
name = "tfacc"
|
|
392
324
|
default = alicloud.vpn.get_gateways()
|
|
393
|
-
default_customer_gateway = alicloud.vpn.CustomerGateway("
|
|
394
|
-
|
|
395
|
-
ip_address="
|
|
396
|
-
asn="2224",
|
|
397
|
-
customer_gateway_name=name)
|
|
398
|
-
change_customer_gateway = alicloud.vpn.CustomerGateway("changeCustomerGateway",
|
|
399
|
-
description="changeCustomerGateway",
|
|
400
|
-
ip_address="2.2.2.6",
|
|
401
|
-
asn="2225",
|
|
402
|
-
customer_gateway_name=name)
|
|
325
|
+
default_customer_gateway = alicloud.vpn.CustomerGateway("default",
|
|
326
|
+
name=name,
|
|
327
|
+
ip_address="192.168.1.1")
|
|
403
328
|
default_connection = alicloud.vpn.Connection("default",
|
|
329
|
+
name=name,
|
|
330
|
+
customer_gateway_id=default_customer_gateway.id,
|
|
404
331
|
vpn_gateway_id=default.ids[0],
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
remote_subnets=[
|
|
408
|
-
"10.0.0.0/24",
|
|
409
|
-
"10.0.1.0/24",
|
|
410
|
-
],
|
|
411
|
-
tags={
|
|
412
|
-
"Created": "TF",
|
|
413
|
-
"For": "example",
|
|
414
|
-
},
|
|
415
|
-
enable_tunnels_bgp=True,
|
|
416
|
-
tunnel_options_specifications=[
|
|
417
|
-
alicloud.vpn.ConnectionTunnelOptionsSpecificationArgs(
|
|
418
|
-
tunnel_ipsec_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs(
|
|
419
|
-
ipsec_auth_alg="md5",
|
|
420
|
-
ipsec_enc_alg="aes256",
|
|
421
|
-
ipsec_lifetime=16400,
|
|
422
|
-
ipsec_pfs="group5",
|
|
423
|
-
),
|
|
424
|
-
customer_gateway_id=default_customer_gateway.id,
|
|
425
|
-
role="master",
|
|
426
|
-
tunnel_bgp_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs(
|
|
427
|
-
local_asn="1219002",
|
|
428
|
-
tunnel_cidr="169.254.30.0/30",
|
|
429
|
-
local_bgp_ip="169.254.30.1",
|
|
430
|
-
),
|
|
431
|
-
tunnel_ike_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs(
|
|
432
|
-
ike_mode="aggressive",
|
|
433
|
-
ike_version="ikev2",
|
|
434
|
-
local_id="localid_tunnel2",
|
|
435
|
-
psk="12345678",
|
|
436
|
-
remote_id="remote2",
|
|
437
|
-
ike_auth_alg="md5",
|
|
438
|
-
ike_enc_alg="aes256",
|
|
439
|
-
ike_lifetime=3600,
|
|
440
|
-
ike_pfs="group14",
|
|
441
|
-
),
|
|
442
|
-
),
|
|
443
|
-
alicloud.vpn.ConnectionTunnelOptionsSpecificationArgs(
|
|
444
|
-
tunnel_ike_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs(
|
|
445
|
-
remote_id="remote24",
|
|
446
|
-
ike_enc_alg="aes256",
|
|
447
|
-
ike_lifetime=27000,
|
|
448
|
-
ike_mode="aggressive",
|
|
449
|
-
ike_pfs="group5",
|
|
450
|
-
ike_auth_alg="md5",
|
|
451
|
-
ike_version="ikev2",
|
|
452
|
-
local_id="localid_tunnel2",
|
|
453
|
-
psk="12345678",
|
|
454
|
-
),
|
|
455
|
-
tunnel_ipsec_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs(
|
|
456
|
-
ipsec_lifetime=2700,
|
|
457
|
-
ipsec_pfs="group14",
|
|
458
|
-
ipsec_auth_alg="md5",
|
|
459
|
-
ipsec_enc_alg="aes256",
|
|
460
|
-
),
|
|
461
|
-
customer_gateway_id=default_customer_gateway.id,
|
|
462
|
-
role="slave",
|
|
463
|
-
tunnel_bgp_config=alicloud.vpn.ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs(
|
|
464
|
-
local_asn="1219002",
|
|
465
|
-
local_bgp_ip="169.254.40.1",
|
|
466
|
-
tunnel_cidr="169.254.40.0/30",
|
|
467
|
-
),
|
|
468
|
-
),
|
|
469
|
-
])
|
|
332
|
+
local_subnets=["192.168.2.0/24"],
|
|
333
|
+
remote_subnets=["192.168.3.0/24"])
|
|
470
334
|
default_pbr_route_entry = alicloud.vpn.PbrRouteEntry("default",
|
|
471
335
|
vpn_gateway_id=default.ids[0],
|
|
472
336
|
route_source="192.168.1.0/24",
|