Fugue.AWS.EC2.Vpc

This is the preferred interface for making VPCs with Fugue. The new function is the right place to start.

Module Members

equal

(Function)

DEPRECATED This function is deprecated. Use == instead.

Type Signature

 fun (Vpc, Vpc) -> Bool
Argument: this
Type: Vpc
Argument: that
Type: Vpc
Returns:
Type: Bool

external

(Function)

Create a reference to an externally managed Vpc.

Example usage:

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

Type Signature

 fun (String, Region) -> Vpc
Argument: vpcId

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

Type: String

Argument: region

The Region containing the target VPC.

Type: Region

Returns:

A reference to the specified VPC.

Type: Vpc

new

(Function)

new VPC (Constructor)

Call this constructor to create a new Fugue.AWS.EC2.Vpc value.

Example usage:

production-vpc: EC2.Vpc.new {
  cidrBlock: "10.0.0.0/16",
  tags: [],
  instanceTenancy: EC2.DefaultTenancy,
  region: AWS.Us-west-2,
  dhcpOptions: None
}

Type Signature

 fun { cidrBlock: String,
       dhcpOptions: Optional<DhcpOptions>,
       tags: Optional<List<Tag>>,
       instanceTenancy: Optional<Tenancy>,
       region: Region,
       enableDnsSupport: Optional<Bool>,
       enableDnsHostnames: Optional<Bool> } -> Vpc
Argument: cidrBlock

The network address space the VPC should encompass. This value is validated at compile time by the constructor, and must be a string written in CIDR notation. For more information see: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation

Type: String

Argument: dhcpOptions

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

Type: Optional<DhcpOptions>

Argument: tags

AWS tag key-value pairs to associate with the VPC. Mutable.

Type: Optional<List<Tag>>

Argument: instanceTenancy

This controls whether or not instances can only be launched with a certain tenancy value. DefaultTenancy allows instances to be launched with any tenancy. Dedicated and HostTenancy constrain instance launches to these tenancy values.

Type: Optional<Tenancy>

Argument: region

The AWS region in which the VPC should be created.

Type: Region

Argument: enableDnsSupport

Set to True to enable DNS support. Mutable.

Type: Optional<Bool>

Argument: enableDnsHostnames

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

Type: Optional<Bool>

Returns:

A Fugue.Core.AWS.EC2.Vpc value.

Type: Vpc

region

(Function)

Retrieve the region from a Vpc value.

Works for Vpcs defined in the composition as well external values.

Example usage:

vpc1: EC2.Vpc.new {
  region: AWS.Us-west-2,
  cidrBlock: "10.0.0.0/16",
}
region1: EC2.Vpc.region(vpc1) # => AWS.Us-west-2

vpc2: EC2.Vpc.external("vpc-1234567", AWS.Us-east-1)
region2: EC2.Vpc.region(vpc2) # => AWS.Us-east-1

Type Signature

 fun (Vpc) -> Region
Argument: vpc

The vpc from which to get the region.

Type: Vpc

Returns:

The region containing the vpc.

Type: Region

VpcSpec

(Type)

type VpcSpec:
  cidrBlock: String
  dhcpOptions: Optional<DhcpOptions>
  tags: Optional<List<Tag>>
  instanceTenancy: Optional<Tenancy>
  region: Region
  enableDnsSupport: Optional<Bool>
  enableDnsHostnames: Optional<Bool>

DEPRECATED

See Fugue.AWS.EC2.Vpc.new for the documentation on the current arguments.

Record {

Field: cidrBlock
Type: String
Field: dhcpOptions
Type: Optional<DhcpOptions>
Field: tags
Type: Optional<List<Tag>>
Field: instanceTenancy
Type: Optional<Tenancy>
Field: region
Type: Region
Field: enableDnsSupport
Type: Optional<Bool>
Field: enableDnsHostnames
Type: Optional<Bool>

}

default

(Value)

default:

DEPRECATED: Use of Fugue.AWS.EC2.default is no longer required. It will be removed in a future release.