AWS CloudFormation
User Guide (Version )

AWS::EC2::ClientVpnEndpoint

Specifies a Client VPN endpoint. A Client VPN endpoint is the resource you create and configure to enable and manage client VPN sessions. It is the destination endpoint at which all client VPN sessions are terminated.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::EC2::ClientVpnEndpoint", "Properties" : { "AuthenticationOptions" : [ ClientAuthenticationRequest, ... ], "ClientCidrBlock" : String, "ConnectionLogOptions" : ConnectionLogOptions, "Description" : String, "DnsServers" : [ String, ... ], "ServerCertificateArn" : String, "SplitTunnel" : Boolean, "TagSpecifications" : [ TagSpecification, ... ], "TransportProtocol" : String } }

Properties

AuthenticationOptions

Information about the authentication method to be used to authenticate clients.

Required: Yes

Type: List of ClientAuthenticationRequest

Update requires: Replacement

ClientCidrBlock

The IPv4 address range, in CIDR notation, from which to assign client IP addresses. The address range cannot overlap with the local CIDR of the VPC in which the associated subnet is located, or the routes that you add manually. The address range cannot be changed after the Client VPN endpoint has been created. The CIDR block should be /22 or greater.

Required: Yes

Type: String

Update requires: Replacement

ConnectionLogOptions

Information about the client connection logging options.

If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged:

  • Client connection requests

  • Client connection results (successful and unsuccessful)

  • Reasons for unsuccessful client connection requests

  • Client connection termination time

Required: Yes

Type: ConnectionLogOptions

Update requires: No interruption

Description

A brief description of the Client VPN endpoint.

Required: No

Type: String

Update requires: No interruption

DnsServers

Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS server.

Required: No

Type: List of String

Update requires: No interruption

ServerCertificateArn

The ARN of the server certificate. For more information, see the AWS Certificate Manager User Guide.

Required: Yes

Type: String

Update requires: No interruption

SplitTunnel

Indicates whether split-tunnel is enabled on the AWS Client VPN endpoint.

By default, split-tunnel on a VPN endpoint is disabled.

For information about split-tunnel VPN endpoints, see Split-Tunnel AWS Client VPN Endpoint in the AWS Client VPN Administrator Guide.

Required: No

Type: Boolean

Update requires: No interruption

TagSpecifications

The tags to apply to the Client VPN endpoint during creation.

Required: No

Type: List of TagSpecification

Update requires: Replacement

TransportProtocol

The transport protocol to be used by the VPN session.

Default value: udp

Required: No

Type: String

Allowed Values: tcp | udp

Update requires: Replacement

Return Values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Client VPN endpoint ID. For example: cvpn-endpoint-1234567890abcdef0.

For more information about using the Ref function, see Ref.

Examples

Creating a Client VPN endpoint

The following example creates a Client VPN endpoint that uses Active Directory authentication and assigns client IP addresses from the 10.0.0.0/22 CIDR range.

YAML

myClientVpnEndpoint: Type: AWS::EC2::ClientVpnEndpoint Properties: AuthenticationOptions: - Type: "directory-service-authentication" ActiveDirectory: DirectoryId: d-926example ClientCidrBlock: "10.0.0.0/22" ConnectionLogOptions: Enabled: false Description: "My Client VPN Endpoint" DnsServers: - "11.11.0.1" ServerCertificateArn: "arn:aws:acm:us-east-1:111122223333:certificate/12345678-1234-1234-1234-123456789012" TagSpecifications: - ResourceType: "client-vpn-endpoint" Tags: - Key: "Purpose" Value: "Production" TransportProtocol: "udp"

JSON

"myClientVpnEndpoint": { "Type": "AWS::EC2::ClientVpnEndpoint", "Properties": { "AuthenticationOptions": [ { "Type": "directory-service-authentication", "ActiveDirectory": { "DirectoryId": "d-926example" } } ], "ClientCidrBlock": "10.0.0.0/22", "ConnectionLogOptions": { "Enabled": false }, "Description": "My Client VPN Endpoint", "DnsServers": [ "11.11.0.1" ], "ServerCertificateArn": "arn:aws:acm:us-east-1:111122223333:certificate/12345678-1234-1234-1234-123456789012", "TagSpecifications": [ { "ResourceType": "client-vpn-endpoint", "Tags": [ { "Key": "Purpose", "Value": "Production" } ] } ], "TransportProtocol": "udp" } }

See Also