Skip to main content

vpn_connections

Creates, updates, deletes or gets a vpn_connection resource or lists vpn_connections in a region

Overview

Namevpn_connections
TypeResource
DescriptionSpecifies a VPN connection between a virtual private gateway and a VPN customer gateway or a transit gateway and a VPN customer gateway.
To specify a VPN connection between a transit gateway and customer gateway, use the ``TransitGatewayId`` and ``CustomerGatewayId`` properties.
To specify a VPN connection between a virtual private gateway and customer gateway, use the ``VpnGatewayId`` and ``CustomerGatewayId`` properties.
For more information, see [](https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the *User Guide*.
Idawscc.ec2.vpn_connections

Fields

NameDatatypeDescription
remote_ipv6_network_cidrstringThe IPv6 CIDR on the AWS side of the VPN connection.<br />Default: &#96;&#96;::/0&#96;&#96;
remote_ipv4_network_cidrstringThe IPv4 CIDR on the AWS side of the VPN connection.<br />Default: &#96;&#96;0.0.0.0/0&#96;&#96;
vpn_tunnel_options_specificationsarrayThe tunnel options for the VPN connection.
customer_gateway_idstringThe ID of the customer gateway at your end of the VPN connection.
outside_ip_address_typestringThe type of IP address assigned to the outside interface of the customer gateway device.<br />Valid values: &#96;&#96;PrivateIpv4&#96;&#96; &#124; &#96;&#96;PublicIpv4&#96;&#96; &#124; &#96;&#96;Ipv6&#96;&#96;<br />Default: &#96;&#96;PublicIpv4&#96;&#96;
static_routes_onlybooleanIndicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.<br />If you are creating a VPN connection for a device that does not support Border Gateway Protocol (BGP), you must specify &#96;&#96;true&#96;&#96;.
enable_accelerationbooleanIndicate whether to enable acceleration for the VPN connection.<br />Default: &#96;&#96;false&#96;&#96;
transit_gateway_idstringThe ID of the transit gateway associated with the VPN connection.<br />You must specify either &#96;&#96;TransitGatewayId&#96;&#96; or &#96;&#96;VpnGatewayId&#96;&#96;, but not both.
typestringThe type of VPN connection.
local_ipv4_network_cidrstringThe IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.<br />Default: &#96;&#96;0.0.0.0/0&#96;&#96;
vpn_gateway_idstringThe ID of the virtual private gateway at the AWS side of the VPN connection.<br />You must specify either &#96;&#96;TransitGatewayId&#96;&#96; or &#96;&#96;VpnGatewayId&#96;&#96;, but not both.
pre_shared_key_storagestringDescribes the storage location for an instance store-backed AMI.
transport_transit_gateway_attachment_idstringThe transit gateway attachment ID to use for the VPN tunnel.<br />Required if &#96;&#96;OutsideIpAddressType&#96;&#96; is set to &#96;&#96;PrivateIpv4&#96;&#96;.
local_ipv6_network_cidrstringThe IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.<br />Default: &#96;&#96;::/0&#96;&#96;
vpn_connection_idstring
tunnel_inside_ip_versionstringIndicate whether the VPN tunnels process IPv4 or IPv6 traffic.<br />Default: &#96;&#96;ipv4&#96;&#96;
tagsarrayAny tags assigned to the VPN connection.
regionstringAWS region.

For more information, see AWS::EC2::VPNConnection.

Methods

NameAccessible byRequired Params
create_resourceINSERTType, CustomerGatewayId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual vpn_connection.

SELECT
region,
remote_ipv6_network_cidr,
remote_ipv4_network_cidr,
vpn_tunnel_options_specifications,
customer_gateway_id,
outside_ip_address_type,
static_routes_only,
enable_acceleration,
transit_gateway_id,
type,
local_ipv4_network_cidr,
vpn_gateway_id,
pre_shared_key_storage,
transport_transit_gateway_attachment_id,
local_ipv6_network_cidr,
vpn_connection_id,
tunnel_inside_ip_version,
tags
FROM awscc.ec2.vpn_connections
WHERE region = 'us-east-1' AND data__Identifier = '<VpnConnectionId>';

INSERT example

Use the following StackQL query and manifest file to create a new vpn_connection resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.ec2.vpn_connections (
CustomerGatewayId,
Type,
region
)
SELECT
'{{ CustomerGatewayId }}',
'{{ Type }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.vpn_connections
WHERE data__Identifier = '<VpnConnectionId>'
AND region = 'us-east-1';

Permissions

To operate on the vpn_connections resource, the following permissions are required:

Read

ec2:DescribeVpnConnections

Create

ec2:DescribeVpnConnections,
ec2:CreateVpnConnection,
ec2:CreateTags

Update

ec2:DescribeVpnConnections,
ec2:CreateTags,
ec2:DeleteTags

List

ec2:DescribeVpnConnections

Delete

ec2:DescribeVpnConnections,
ec2:DeleteVpnConnection