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
Description
Specifies 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 in the User Guide.
Idawscc.ec2.vpn_connections

Fields

NameDatatypeDescription
remote_ipv6_network_cidrstring
The IPv6 CIDR on the AWS side of the VPN connection.Default: ::/0
remote_ipv4_network_cidrstring
The IPv4 CIDR on the AWS side of the VPN connection.Default: 0.0.0.0/0
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_typestring
The type of IP address assigned to the outside interface of the customer gateway device.Valid values: PrivateIpv4 | PublicIpv4 | Ipv6
Default: PublicIpv4
static_routes_onlyboolean
Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.If you are creating a VPN connection for a device that does not support Border Gateway Protocol (BGP), you must specify true.
enable_accelerationboolean
Indicate whether to enable acceleration for the VPN connection.Default: false
transit_gateway_idstring
The ID of the transit gateway associated with the VPN connection.You must specify either TransitGatewayId or VpnGatewayId, but not both.
typestringThe type of VPN connection.
local_ipv4_network_cidrstring
The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.Default: 0.0.0.0/0
vpn_gateway_idstring
The ID of the virtual private gateway at the AWS side of the VPN connection.You must specify either TransitGatewayId or VpnGatewayId, but not both.
pre_shared_key_storagestringDescribes the storage location for an instance store-backed AMI.
transport_transit_gateway_attachment_idstring
The transit gateway attachment ID to use for the VPN tunnel.Required if OutsideIpAddressType is set to PrivateIpv4.
local_ipv6_network_cidrstring
The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.Default: ::/0
vpn_connection_idstring
tunnel_inside_ip_versionstring
Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.Default: ipv4
tagsarrayAny tags assigned to the VPN connection.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcevpn_connectionsINSERTType, CustomerGatewayId, region
delete_resourcevpn_connectionsDELETEIdentifier, region
update_resourcevpn_connectionsUPDATEIdentifier, PatchDocument, region
list_resourcesvpn_connections_list_onlySELECTregion
get_resourcevpn_connectionsSELECTIdentifier, 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 = '{{ region }}' AND
Identifier = '{{ vpn_connection_id }}';

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
'{{ customer_gateway_id }}',
'{{ type }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.ec2.vpn_connections
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ vpn_connection_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.vpn_connections
WHERE
Identifier = '{{ vpn_connection_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

ec2:DescribeVpnConnections