vpn_connections
Creates, updates, deletes or gets a vpn_connection
resource or lists vpn_connections
in a region
Overview
Name | vpn_connections |
Type | Resource |
Description | Resource Type definition for AWS::EC2::VPNConnection |
Id | aws.ec2.vpn_connections |
Fields
Name | Datatype | Description |
---|---|---|
vpn_connection_id | string | The provider-assigned unique ID for this managed resource |
customer_gateway_id | string | The ID of the customer gateway at your end of the VPN connection. |
static_routes_only | boolean | Indicates whether the VPN connection uses static routes only. |
tags | array | Any tags assigned to the VPN connection. |
transit_gateway_id | string | The ID of the transit gateway associated with the VPN connection. |
type | string | The type of VPN connection. |
vpn_gateway_id | string | The ID of the virtual private gateway at the AWS side of the VPN connection. |
vpn_tunnel_options_specifications | array | The tunnel options for the VPN connection. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Type, CustomerGatewayId, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.vpn_connections (
CustomerGatewayId,
Type,
region
)
SELECT
'{{ CustomerGatewayId }}',
'{{ Type }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.vpn_connections (
CustomerGatewayId,
StaticRoutesOnly,
Tags,
TransitGatewayId,
Type,
VpnGatewayId,
VpnTunnelOptionsSpecifications,
region
)
SELECT
'{{ CustomerGatewayId }}',
'{{ StaticRoutesOnly }}',
'{{ Tags }}',
'{{ TransitGatewayId }}',
'{{ Type }}',
'{{ VpnGatewayId }}',
'{{ VpnTunnelOptionsSpecifications }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: vpn_connection
props:
- name: CustomerGatewayId
value: '{{ CustomerGatewayId }}'
- name: StaticRoutesOnly
value: '{{ StaticRoutesOnly }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: TransitGatewayId
value: '{{ TransitGatewayId }}'
- name: Type
value: '{{ Type }}'
- name: VpnGatewayId
value: '{{ VpnGatewayId }}'
- name: VpnTunnelOptionsSpecifications
value:
- PreSharedKey: '{{ PreSharedKey }}'
TunnelInsideCidr: '{{ TunnelInsideCidr }}'
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