AWS Amazon EC2 VPN Connection Route

This page shows how to write Terraform and CloudFormation for Amazon EC2 VPN Connection Route and write them securely.

aws_vpn_connection_route (Terraform)

The VPN Connection Route in Amazon EC2 can be configured in Terraform with the resource name aws_vpn_connection_route. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

github-iconwellcometrust/ncw-terraform-modules
resource "aws_vpn_connection_route" "aws-third-party-infrastructuree-vpn" {
  destination_cidr_block = "10.215.0.0/16"
  vpn_connection_id      = aws_vpn_connection.aws-third-party-infrastructure-vpn.id
}

resource "aws_vpn_connection_route" "aws-third-party-infrastructure-1" {
github-icongmirsky/aws-azure-vpn
resource "aws_vpn_connection_route" "vpn_connection_route_1" {
  destination_cidr_block = azurerm_virtual_network.vnet.address_space[0]
  vpn_connection_id      = aws_vpn_connection.vpn_connection_1.id
}

resource "aws_vpn_connection_route" "vpn_connection_route_2" {

Parameters

Explanation in Terraform Registry

Provides a static route between a VPN connection and a customer gateway.

AWS::EC2::VPNConnectionRoute (CloudFormation)

The VPNConnectionRoute in EC2 can be configured in CloudFormation with the resource name AWS::EC2::VPNConnectionRoute. The following sections describe how to use the resource and its parameters.

Parameters

Explanation in CloudFormation Registry

Specifies a static route for a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

For more information, see AWS Site-to-Site VPN in the AWS Site-to-Site VPN User Guide.

Frequently asked questions

What is AWS Amazon EC2 VPN Connection Route?

AWS Amazon EC2 VPN Connection Route is a resource for Amazon EC2 of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon EC2 VPN Connection Route?

For Terraform, the wellcometrust/ncw-terraform-modules and gmirsky/aws-azure-vpn source code examples are useful. See the Terraform Example section for further details.