Fugue.AWS.Pattern.Network

Module Members

new

(Function)

Network constructor.

Creates a two tiered network with public and private subnets.

Example:

import Fugue.AWS.Pattern.Network as Network
import Fugue.Core.AWS.Common as AWS

net: Network.new {
  name: "my-pub-net",
  region: AWS.Us-west-2,
  cidr: "10.0.0.0/16",
  publicSubnets: [
    (AWS.A, "10.0.1.0/24"),
    (AWS.B, "10.0.2.0/24"),
  ],
  privateSubnets: [
    (AWS.A, "10.0.3.0/24"),
    (AWS.B, "10.0.4.0/24"),
  ],
}

Type Signature

 fun { name: String,
       region: Region,
       cidr: String,
       publicSubnets: List<(AvailabilityZone, String)>,
       privateSubnets: List<(AvailabilityZone, String)>,
       dhcpOptions: Optional<DhcpOptions>,
       enableDnsSupport: Optional<Bool>,
       enableDnsHostnames: Optional<Bool>,
       tags: Optional<List<Tag>> } -> Network
Argument: name

The base name of the network. Used as the base for generating Name tags.

Type: String

Argument: region

The region in which to create the network.

Type: Region

Argument: cidr

The CIDR to use when allocating the underlying Vpc.

Type: String

Argument: publicSubnets

A list of AvailabilityZone and network addresses in CIDR notation. A public subnet is created for each pair.

Type: List<(AvailabilityZone, String)>

Argument: privateSubnets

A list of AvailabilityZone and network addresses in CIDR notation. A private subnet is created for each pair.

Type: List<(AvailabilityZone, String)>

Argument: dhcpOptions

A DhcpOptions record, describing DHCP options for the VPC’s operation.

Type: Optional<DhcpOptions>

Argument: enableDnsSupport

Set to True to enable DNS support for the Vpc.

Type: Optional<Bool>

Argument: enableDnsHostnames

Set to True to enable DNS hostnames for the Vpc. This can only be enabled if enableDnsSupport is also True.

Type: Optional<Bool>

Argument: tags

Key-value pair tags to apply to the Network.

Type: Optional<List<Tag>>

Returns:

A Network value.

Type: Network

public

(Function)

Public Network constructor.

Creates a network with only public subnets.

Example:

import Fugue.AWS.Pattern.Network as Network
import Fugue.Core.AWS.Common as AWS

net: Network.public {
  name: "my-pub-net",
  region: AWS.Us-west-2,
  cidr: "10.0.0.0/16",
  subnets: [
    (AWS.A, "10.0.1.0/24"),
    (AWS.B, "10.0.2.0/24"),
  ]
}

Type Signature

 fun { name: String,
       region: Region,
       cidr: String,
       subnets: List<(AvailabilityZone, String)>,
       dhcpOptions: Optional<DhcpOptions>,
       enableDnsSupport: Optional<Bool>,
       enableDnsHostnames: Optional<Bool>,
       tags: Optional<List<Tag>> } -> Network
Argument: name

The base name of the network. Used as the base for generating Name tags.

Type: String

Argument: region

The region in which to create the network.

Type: Region

Argument: cidr

The CIDR to use when allocating the underlying Vpc.

Type: String

Argument: subnets

A list of AvailabilityZone and network addresses in CIDR notation. A public subnet is created for each pair.

Type: List<(AvailabilityZone, String)>

Argument: dhcpOptions

A DhcpOptions record, describing DHCP options for the VPC’s operation.

Type: Optional<DhcpOptions>

Argument: enableDnsSupport

Set to True to enable DNS support for the Vpc.

Type: Optional<Bool>

Argument: enableDnsHostnames

Set to True to enable DNS hostnames for the Vpc. This can only be enabled if enableDnsSupport is also True.

Type: Optional<Bool>

Argument: tags

Key-value pair tags to apply to the Network.

Type: Optional<List<Tag>>

Returns:

A Network with only public subnets.

Type: Network

Network

(Type)

type Network:
  vpc: Vpc
  publicSubnets: List<Subnet>
  privateSubnets: List<Subnet>
  igw: InternetGateway
  routes: List<RouteTable>
  region: Region

Record {

Field: vpc

The underlying vpc.

Type: Vpc

Field: publicSubnets

The list of public subnets.

Type: List<Subnet>

Field: privateSubnets

The list of private subnets.

Type: List<Subnet>

Field: igw

The underlying internet gateway.

Type: InternetGateway

Field: routes

The list of route tables created for the network.

Type: List<RouteTable>

Field: region

The region in which the network is deployed.

Type: Region

}