Fugue.AWS.EC2.VpnConnection

Table of Contents

Module Members

new

(Function)

new VpnConnection (Constructor)

Call this constructor to create a new Fugue.Core.AWS.EC2.VpnConnection.

Example usage:

import Fugue.AWS as AWS
import Fugue.AWS.EC2 as EC2
import Fugue.AWS.Pattern.Network as Network

network: Network.public {
  name: "vpn-example",
  region: AWS.Us-west-2,
  cidr: "10.42.0.0/16",
  subnets: [
    (AWS.A, "10.42.10.0/24"),
  ],
}

vpnGw: EC2.VpnGateway.new {
  region: network.region,
  vpcAttachment: network.vpc,
  tags: [AWS.tag("Name", "example-vpn")],
}

customerGw: EC2.CustomerGateway.new {
  region: network.region,
  bgpAsn: 65000,
  ipAddress: "12.1.2.3",
  tags: [AWS.tag("Name", "example-vpn")],
}

vpnConnection: EC2.VpnConnection.new {
  customerGateway: customerGw,
  vpnGateway: vpnGw,
  tags: [AWS.tag("Name", "example-vpn")],
}

Type Signature

 fun { vpnType: Optional<VpnGatewayType>,
       customerGateway: CustomerGateway,
       vpnGateway: VpnGateway,
       tags: Optional<List<Tag>>,
       routes: Optional<List<String>>,
       staticRoutesOnly: Optional<Bool> } -> VpnConnection
Argument: vpnType

The type of vpn connection to support. EC2.Ipsec_1 is currently the only supported value. Defaults to EC2.Ipsec_1.

Type: Optional<VpnGatewayType>

Argument: customerGateway

The customer gateway to connect to.

Type: CustomerGateway

Argument: vpnGateway

The vpn gateway to connect to.

Type: VpnGateway

Argument: tags

The AWS tag key-value pairs to associate with the vpn connection. Mutable.

Type: Optional<List<Tag>>

Argument: routes

A list of networks in CIDR notation, each of which will be configured as static routes through the vpn connection. Mutable.

Type: Optional<List<String>>

Argument: staticRoutesOnly

If True the vpn connection will use only static routes. If False routes are propagated using BGP. Must be set to True for customer gateways that do not support BGP. Defaults to False.

Type: Optional<Bool>

Returns:

a Fugue.Core.AWS.EC2.VpnGateway value.

Type: VpnConnection