AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::EC2::ClientVpnRoute

CfnClientVpnRoute

Specifies a network route to add to a Client VPN endpoint. Each Client VPN endpoint has a route table that describes the available destination network routes. Each route in the route table specifies the path for traffic to specific resources or networks. A target network association must be created before you can specify a route. If you're setting up all the components of a Client VPN endpoint at the same time, you must use the [DependsOn Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html) to declare a dependency on the `AWS::EC2::ClientVpnTargetNetworkAssociation` resource.

Import

import { CfnClientVpnRoute } from 'aws-cdk-lib/aws-ec2';

Or use the module namespace:

import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnClientVpnRoute

Properties

Configuration passed to the constructor as CfnClientVpnRouteProps.

clientVpnEndpointIdRequired
string

The ID of the Client VPN endpoint to which to add the route.

destinationCidrBlockRequired
string

The IPv4 address range, in CIDR notation, of the route destination. For example:. - To add a route for Internet access, enter `0.0.0.0/0` - To add a route for a peered VPC, enter the peered VPC's IPv4 CIDR range - To add a route for an on-premises network, enter the AWS Site-to-Site VPN connection's IPv4 CIDR range - To add a route for the local network, enter the client CIDR range

targetVpcSubnetIdRequired
string

The ID of the subnet through which you want to route traffic. The specified subnet must be an existing target network of the Client VPN endpoint. Alternatively, if you're adding a route for the local network, specify `local` .

descriptionOptional
string

A brief description of the route.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon EC2 Cheat Sheet

Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.

Download Free Infographic