Resource: aws_ec2_client_vpn_endpoint

Provides an AWS Client VPN endpoint for OpenVPN clients. For more information on usage, please see the AWS Client VPN Administrator's Guide.

Example Usage

resource "aws_ec2_client_vpn_endpoint" "example" {
  description            = "terraform-clientvpn-example"
  server_certificate_arn = aws_acm_certificate.cert.arn
  client_cidr_block      = "10.0.0.0/16"

  authentication_options {
    type                       = "certificate-authentication"
    root_certificate_chain_arn = aws_acm_certificate.root_cert.arn
  }

  connection_log_options {
    enabled               = true
    cloudwatch_log_group  = aws_cloudwatch_log_group.lg.name
    cloudwatch_log_stream = aws_cloudwatch_log_stream.ls.name
  }
}

Argument Reference

This resource supports the following arguments:

authentication_options Argument Reference

One of the following arguments must be supplied:

client_connect_options Argument reference

client_login_banner_options Argument reference

connection_log_options Argument Reference

One of the following arguments must be supplied:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import AWS Client VPN endpoints using the id value found via aws ec2 describe-client-vpn-endpoints. For example:

import {
  to = aws_ec2_client_vpn_endpoint.example
  id = "cvpn-endpoint-0ac3a1abbccddd666"
}

Using terraform import, import AWS Client VPN endpoints using the id value found via aws ec2 describe-client-vpn-endpoints. For example:

% terraform import aws_ec2_client_vpn_endpoint.example cvpn-endpoint-0ac3a1abbccddd666