Fugue.AWS.EC2.VpcPeeringConnection

Table of Contents

Module Members

external

(Function)

Create a reference to an externally managed Vpc Peering Connection.

Example usage:

vpc: EC2.VpcPeeringConnection.external("pcx-1234abcd", AWS.Us-east-1)

Type Signature

 fun (String, Region) -> VpcPeeringConnection
Argument: pcxId

The ID of the target VPC Peering Connection. Must be of the form “pcx-” followed by 8 characters from a-z and 0-9.

Type: String

Argument: region

The Region containing the target VPC Peering Connection.

Type: Region

Returns:

A reference to the specified VPC.

Type: VpcPeeringConnection

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>>,
       resourceId: Optional<String> } -> 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>>

Argument: resourceId

Resource ID of the resource to import with Fugue Import. This field is only honored on fugue run. The resource ID is the AWS ID. Mutable. Example: pcx-1234abcd

Type: Optional<String>

Returns:

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

Type: VpcPeeringConnection