AWS::EC2::ClientVpnEndpoint - AWS CloudFormation

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, "ClientConnectOptions" : ClientConnectOptions, "ClientLoginBannerOptions" : ClientLoginBannerOptions, "ConnectionLogOptions" : ConnectionLogOptions, "Description" : String, "DnsServers" : [ String, ... ], "SecurityGroupIds" : [ String, ... ], "SelfServicePortal" : String, "ServerCertificateArn" : String, "SessionTimeoutHours" : Integer, "SplitTunnel" : Boolean, "TagSpecifications" : [ TagSpecification, ... ], "TransportProtocol" : String, "VpcId" : String, "VpnPort" : Integer } }

Properties

AuthenticationOptions

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

Required: Yes

Type: Array 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. Client CIDR range must have a size of at least /22 and must not be greater than /12.

Required: Yes

Type: String

Update requires: Replacement

ClientConnectOptions

The options for managing connection authorization for new client connections.

Required: No

Type: ClientConnectOptions

Update requires: No interruption

ClientLoginBannerOptions

Options for enabling a customizable text banner that will be displayed on AWS provided clients when a VPN session is established.

Required: No

Type: ClientLoginBannerOptions

Update requires: No interruption

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: Array of String

Update requires: No interruption

SecurityGroupIds

The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC that contains the security groups.

Required: No

Type: Array of String

Update requires: No interruption

SelfServicePortal

Specify whether to enable the self-service portal for the Client VPN endpoint.

Default Value: enabled

Required: No

Type: String

Allowed values: enabled | disabled

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

SessionTimeoutHours

The maximum VPN session duration time in hours.

Valid values: 8 | 10 | 12 | 24

Default value: 24

Required: No

Type: Integer

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: Array 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

VpcId

The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the request, the default security group for the VPC is applied.

Required: No

Type: String

Update requires: No interruption

VpnPort

The port number to assign to the Client VPN endpoint for TCP and UDP traffic.

Valid Values: 443 | 1194

Default Value: 443

Required: No

Type: Integer

Update requires: No interruption

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

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