Creates an IPsec-VPN connection.
Syntax
{
"Type": "ALIYUN::VPC::VpnConnection",
"Properties": {
"IpsecConfig": Map,
"Name": String,
"IkeConfig": Map,
"HealthCheckConfig": Map,
"VpnGatewayId": String,
"CustomerGatewayId": String,
"RemoteSubnet": String,
"LocalSubnet": String,
"EffectImmediately": Boolean,
"EnableTunnelsBgp": Boolean,
"RemoteCaCertificate": String,
"BgpConfig": Map,
"AutoConfigRoute": Boolean,
"EnableDpd": Boolean,
"EnableNatTraversal": Boolean,
"TunnelOptionsSpecification": List
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Name |
String |
No |
Yes |
The name of the IPsec-VPN connection. |
The name must be 2 to 128 characters in length. It must start with a letter and cannot start with |
|
IkeConfig |
Map |
No |
Yes |
The configurations of Phase 1 negotiations. |
For more information, see IkeConfig properties. |
|
IpsecConfig |
Map |
No |
Yes |
The configurations of Phase 2 negotiations. |
For more information, see IpsecConfig properties. |
|
HealthCheckConfig |
Map |
No |
No |
The health check configurations. |
For more information, see HealthCheckConfig properties. |
|
VpnGatewayId |
String |
Yes |
No |
The ID of the VPN gateway. |
None. |
|
CustomerGatewayId |
String |
No |
No |
The ID of the customer gateway. |
None. |
|
RemoteSubnet |
String |
Yes |
Yes |
The CIDR blocks on the data center side, used in Phase 2 negotiations. |
Separate multiple CIDR blocks with commas (,). Example: 192.168.3.0/24,192.168.4.0/24. |
|
LocalSubnet |
String |
Yes |
Yes |
The CIDR blocks on the virtual private cloud (VPC) side, used in Phase 2 negotiations. |
Separate multiple CIDR blocks with commas (,). Example: 192.168.1.0/24,192.168.2.0/24. |
|
EffectImmediately |
Boolean |
No |
Yes |
Whether to immediately start IPsec negotiations. |
Valid values:
|
|
EnableTunnelsBgp |
Boolean |
No |
No |
Whether to enable Border Gateway Protocol (BGP) for tunnels. |
Valid values:
|
|
RemoteCaCertificate |
String |
No |
No |
The certificate authority (CA) certificate of the peer. |
None. |
|
BgpConfig |
Map |
No |
Yes |
The BGP configurations of the tunnel. |
For more information, see BgpConfig properties. |
|
AutoConfigRoute |
Boolean |
No |
Yes |
Whether to automatically configure routes. |
Valid values:
|
|
EnableDpd |
Boolean |
No |
Yes |
Whether to enable dead peer detection (DPD) for the IPsec-VPN connection. |
Valid values:
|
|
EnableNatTraversal |
Boolean |
No |
Yes |
Whether to enable NAT traversal for the tunnel. |
Valid values:
|
|
TunnelOptionsSpecification |
List |
No |
No |
The tunnel configurations of the IPsec-VPN connection. |
For more information, see TunnelOptionsSpecification properties. |
IkeConfig syntax
"IkeConfig": {
"RemoteId": String,
"Psk": String,
"IkeVersion": String,
"IkeMode": String,
"IkeAuthAlg": String,
"IkeEncAlg": String,
"IkePfs": String,
"IkeLifetime": Integer,
"LocalId": String
}
IkeConfig properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
RemoteId |
String |
No |
Yes |
The identifier of the customer gateway. |
The identifier can be up to 100 characters in length. The default value is the public IP address of the customer gateway. |
|
Psk |
String |
No |
Yes |
The pre-shared key for authentication between the VPN gateway and the customer gateway. |
The key can be up to 100 characters in length. By default, a random value is generated. You can also specify a pre-shared key. |
|
IkeVersion |
String |
No |
Yes |
The version of the Internet Key Exchange (IKE) protocol. |
Valid values:
|
|
IkeMode |
String |
No |
Yes |
The negotiation mode of IKEv1. |
Valid values:
|
|
IkeAuthAlg |
String |
No |
Yes |
The authentication algorithm used in Phase 1 negotiations. |
Valid values:
|
|
IkeEncAlg |
String |
No |
Yes |
The encryption algorithm used in Phase 1 negotiations. |
Valid values:
|
|
IkePfs |
String |
No |
Yes |
The Diffie-Hellman (DH) key exchange algorithm used in Phase 1 negotiations. |
Valid values:
|
|
IkeLifetime |
Integer |
No |
Yes |
The SA lifetime determined by Phase 1 negotiations. |
Valid values: 0 to 86400. Default value: 86400. |
|
LocalId |
String |
No |
Yes |
The identifier of the VPN gateway. |
The identifier can be up to 100 characters in length. The default value is the public IP address of the VPN gateway. |
IpsecConfig syntax
"IpsecConfig": {
"IpsecAuthAlg": String,
"IpsecEncAlg": String,
"IpsecLifetime": Integer,
"IpsecPfs": String
}
IpsecConfig properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
IpsecAuthAlg |
String |
No |
Yes |
The authentication algorithm used in Phase 2 negotiations. |
Valid values:
|
|
IpsecEncAlg |
String |
No |
Yes |
The encryption algorithm used in Phase 2 negotiations. |
Valid values:
|
|
IpsecLifetime |
Integer |
No |
Yes |
The SA lifetime determined by Phase 2 negotiations. |
Valid values: 0 to 86400. Unit: seconds. Default value: 86400. |
|
IpsecPfs |
String |
No |
Yes |
The DH key exchange algorithm used in Phase 2 negotiations. |
Valid values:
|
HealthCheckConfig syntax
"HealthCheckConfig": {
"Enable": Boolean,
"Dip": Boolean,
"Retry": Integer,
"Sip": String,
"Interval": Integer,
"Policy": String
}
HealthCheckConfig properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Enable |
Boolean |
No |
Yes |
Whether to enable the health check feature. |
Valid values:
If you set this property to true, you must specify other parameters in this table. |
|
Interval |
Integer |
No |
Yes |
The interval between two consecutive health check retries. |
Unit: seconds. |
|
Retry |
Integer |
No |
Yes |
The maximum number of health check retries. |
None. |
|
Dip |
String |
No |
Yes |
The IP address of the data center accessible through the IPsec connection. |
None. |
|
Sip |
String |
No |
Yes |
The IP address accessible from the data center through the IPsec connection. |
None. |
|
Policy |
String |
No |
No |
Whether to withdraw published routes when the health check fails. |
None. |
BgpConfig syntax
"BgpConfig": {
"TunnelCidr": String,
"LocalBgpIp": String,
"EnableBgp": Boolean,
"LocalAsn": Number
}
BgpConfig properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
TunnelCidr |
String |
No |
Yes |
The BGP CIDR block of the tunnel. |
None. |
|
LocalBgpIp |
String |
No |
Yes |
The BGP address on the Alibaba Cloud side. |
None. |
|
EnableBgp |
Boolean |
No |
No |
Whether to enable BGP for the tunnel. |
Valid values:
Default value: false. |
|
LocalAsn |
Number |
No |
Yes |
The autonomous system number (ASN) of the tunnel on the Alibaba Cloud side. |
None. |
TunnelOptionsSpecification syntax
"TunnelOptionsSpecification": [
{
"RemoteCaCertificate": String,
"CustomerGatewayId": String,
"TunnelBgpConfig": Map,
"TunnelIpsecConfig": Map,
"EnableDpd": Boolean,
"TunnelIkeConfig": Map,
"EnableNatTraversal": Boolean,
"Role": String
}
]
TunnelOptionsSpecification properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
RemoteCaCertificate |
String |
No |
No |
The CA certificate of the tunnel peer. |
This property is returned only if the VPN gateway is of the ShangMi (SM) type. |
|
CustomerGatewayId |
String |
No |
Yes |
The ID of the customer gateway associated with the tunnel. |
None. |
|
TunnelBgpConfig |
Map |
No |
Yes |
The BGP configurations of the tunnel. |
For more information, see TunnelBgpConfig properties. |
|
TunnelIpsecConfig |
Map |
No |
No |
The configurations of Phase 2 negotiations. |
For more information, see TunnelIpsecConfig properties. |
|
EnableDpd |
Boolean |
No |
Yes |
Whether to enable DPD for the IPsec-VPN connection. |
Valid values:
|
|
TunnelIkeConfig |
Map |
No |
Yes |
The configurations of Phase 1 negotiations. |
For more information, see TunnelIkeConfig properties. |
|
EnableNatTraversal |
Boolean |
No |
Yes |
Whether to enable NAT traversal for the IPsec-VPN connection. |
Valid values:
|
|
Role |
String |
No |
Yes |
The role of the tunnel. |
Valid values:
|
TunnelBgpConfig syntax
"TunnelBgpConfig": {
"TunnelCidr": String,
"LocalAsn": Number,
"LocalBgpIp": String
}
TunnelBgpConfig properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
TunnelCidr |
String |
No |
Yes |
The BGP CIDR block of the tunnel. |
None. |
|
LocalBgpIp |
String |
No |
Yes |
The BGP address on the Alibaba Cloud side. |
None. |
|
LocalAsn |
Number |
No |
Yes |
The ASN of the tunnel on the Alibaba Cloud side. |
None. |
TunnelIpsecConfig syntax
"TunnelIpsecConfig": {
"IpsecAuthAlg": String,
"IpsecEncAlg": String,
"IpsecPfs": String,
"IpsecLifetime": Integer
}
TunnelIpsecConfig properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
IpsecAuthAlg |
String |
No |
Yes |
The authentication algorithm in the IPsec phase. |
None. |
|
IpsecEncAlg |
String |
No |
Yes |
The encryption algorithm in the IPsec phase. |
None. |
|
IpsecPfs |
String |
No |
Yes |
The lifetime of the IPsec phase. |
Unit: seconds. |
|
IpsecLifetime |
Integer |
No |
Yes |
The ASN of the tunnel on the Alibaba Cloud side. |
None. |
TunnelIkeConfig syntax
"TunnelIkeConfig": {
"Psk": String,
"IkePfs": String,
"LocalId": String,
"IkeVersion": String,
"IkeAuthAlg": String,
"IkeMode": String,
"RemoteId": String,
"IkeLifetime": Integer,
"IkeEncAlg": String
}
TunnelIkeConfig properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Psk |
String |
No |
Yes |
The pre-shared key. |
None. |
|
IkePfs |
String |
No |
Yes |
The DH group in the IKE phase. |
None. |
|
LocalId |
String |
No |
Yes |
The identifier of the tunnel on the Alibaba Cloud side. |
None. |
|
IkeVersion |
String |
No |
Yes |
The version of the IKE protocol. |
Valid values:
Compared with IKEv1, IKEv2 simplifies the SA negotiation process and is more suitable for scenarios in which multiple CIDR blocks are used. |
|
IkeAuthAlg |
String |
No |
Yes |
The authentication algorithm in the IKE phase. |
None. |
|
IkeMode |
String |
No |
Yes |
The IKE negotiation mode. |
Valid values:
|
|
RemoteId |
String |
No |
Yes |
The identifier of the tunnel peer. |
None. |
|
IkeLifetime |
Integer |
No |
Yes |
The lifetime of the IKE phase. |
Unit: seconds. |
|
IkeEncAlg |
String |
No |
Yes |
The encryption algorithm in the IKE phase. |
None. |
Return values
Fn::GetAtt
-
VpnConnectionId: the ID of the IPsec-VPN connection.
-
Status: the state of the IPsec-VPN connection.
-
PeerVpnConnectionConfig: the VPC connection configurations of the peer.