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
DescriptionResource Type definition for AWS::EC2::VPNConnection
Idaws.ec2.vpn_connections

Fields

NameDatatypeDescription
vpn_connection_idstringThe provider-assigned unique ID for this managed resource
customer_gateway_idstringThe ID of the customer gateway at your end of the VPN connection.
static_routes_onlybooleanIndicates whether the VPN connection uses static routes only.
tagsarrayAny tags assigned to the VPN connection.
transit_gateway_idstringThe ID of the transit gateway associated with the VPN connection.
typestringThe type of VPN connection.
vpn_gateway_idstringThe ID of the virtual private gateway at the AWS side of the VPN connection.
vpn_tunnel_options_specificationsarrayThe tunnel options for the VPN connection.
regionstringAWS region.

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 vpn_connections in a region.

SELECT
region,
vpn_connection_id,
customer_gateway_id,
static_routes_only,
tags,
transit_gateway_id,
type,
vpn_gateway_id,
vpn_tunnel_options_specifications
FROM aws.ec2.vpn_connections
WHERE region = 'us-east-1';

Gets all properties from an individual vpn_connection.

SELECT
region,
vpn_connection_id,
customer_gateway_id,
static_routes_only,
tags,
transit_gateway_id,
type,
vpn_gateway_id,
vpn_tunnel_options_specifications
FROM aws.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 aws.ec2.vpn_connections (
CustomerGatewayId,
Type,
region
)
SELECT
'{{ CustomerGatewayId }}',
'{{ Type }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.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:

Create

ec2:DescribeVpnConnections,
ec2:CreateVpnConnection,
ec2:CreateTags

Delete

ec2:DescribeVpnConnections,
ec2:DeleteVpnConnection,
ec2:DeleteTags

Update

ec2:DescribeVpnConnections,
ec2:CreateTags,
ec2:DeleteTags

Read

ec2:DescribeVpnConnections

List

ec2:DescribeVpnConnections