Fugue.AWS.EC2.VpcPeeringConnection

Table of Contents

Module Members

new

(Function)

new VpcPeeringConnection (Constructor)

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

Example usage:

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

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

accepter: Network.public {
  name: "accepting vpc",
  cidr: "10.13.0.0/16",
  region: AWS.Us-west-2,
  subnets: [
    (AWS.B, "10.13.10.0/24")
  ]
}

peering: EC2.VpcPeeringConnection.new {
  vpc: requester.vpc,
  peerVpc: EC2.PeerVpc.managed {
    vpc: accepter.vpc,
    options: EC2.PeeringOptions.allowDnsResolution,
  },
  options: EC2.PeeringOptions.allowDnsResolution,
}

Type Signature

 fun { vpc: Vpc,
       peerVpc: PeerVpc,
       options: Optional<PeeringOptions>,
       tags: Optional<List<Tag>> } -> VpcPeeringConnection
Argument: vpc

The VPC requesting the peering connection. Must not be an externally defined Vpc.

Type: Vpc

Argument: peerVpc

The VPC to request a peering connection to. If a ManagedVpc is provided the peering request will be automatically be accepted by Fugue. If an UnmanagedVpc is provided the peering request will need to be manually accepted outside of Fugue via the AWS CLI or console. See Fugue.AWS.EC2.PeerVpc for documentation and functions for creating PeerVpc values.

Type: PeerVpc

Argument: options

The PeeringOptions to associate with the requesting side of the peering connection. Mutable.

Type: Optional<PeeringOptions>

Argument: tags

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

Type: Optional<List<Tag>>

Returns:

A Fugue.Core.AWS.EC2.VpcPeeringConnection value.

Type: VpcPeeringConnection