AwsMultiAzRegionModule
Hierarchy
- AModule<AwsMultiAzRegionModuleSchema, AwsMultiAzRegion>
- AwsMultiAzRegionModule
Index
Constructors
Properties
Methods
Resources
Constructors
constructor
Parameters
moduleId: string
The ID this module is loaded under.
Returns AwsMultiAzRegionModule
Properties
readonlyinheritedmoduleId
The ID this module was loaded under. It scopes everything the module produces, so the same module class can be loaded more than once.
staticreadonlyinheritedMODULE_PACKAGE
The package the module is registered under, set by Module.
staticreadonlyinheritedMODULE_SCHEMA
The schema of the module's inputs, set by Module.
Methods
onInit
Validates the VPC CIDR against the account's other regions, then creates the region across the given availability zones.
Parameters
inputs: AwsMultiAzRegionModuleSchema
Returns Promise<AwsMultiAzRegion>
inheritedregisterHooks
To hook custom behavior into Octo's lifecycle for the duration of this module. Override it to return the callbacks you want run.
Returns { postCommitHooks?: PostHookSignature[]; postModelActionHooks?: PostHookSignature[]; postResourceActionHooks?: PostHookSignature[]; preCommitHooks?: PreHookSignature[]; preModelActionHooks?: PreHookSignature[]; preResourceActionHooks?: PreHookSignature[] }
optionalpostCommitHooks?: PostHookSignature[]
optionalpostModelActionHooks?: PostHookSignature[]
optionalpostResourceActionHooks?: PostHookSignature[]
optionalpreCommitHooks?: PreHookSignature[]
optionalpreModelActionHooks?: PreHookSignature[]
optionalpreResourceActionHooks?: PreHookSignature[]
inheritedregisterMetadata
To derive values that both AModule.onInit and this module's actions need - typically facts resolved from another module's anchors, such as an account ID or a region's availability zones. Override it, and the returned object is handed to every action of this module as
actionInputs.metadata.Parameters
inputs: AwsMultiAzRegionModuleSchema
The inputs this module was loaded with.
Returns Promise<Record<string, unknown>>
AwsMultiAzRegionModulecreates a VPC and its internet gateway across several availability zones of one AWS region (regionIds,vpcCidrBlock), for what must survive a zone going down.Nothing: a VPC and an internet gateway are free. Traffic between availability zones is billed about $0.01 per GB each way, and what runs inside is billed by its own module.
A replacement deletes the VPC and everything inside it, subnets and the services in them, and creates them again. Adding a zone to
regionIdschanges the VPC in place.TypeScript
Modules/Region/AwsMultiAzRegion
Every zone in
regionIdsbelongs to one AWS region. A service survives a zone's outage only when its subnets span more than one zone.vpcCidrBlockis between a /16 and a /28, and every subnet's block lies inside it.The VPC is IPv4 only and runs on shared hardware, and its one internet gateway is named
default.Nothing of its own: the VPC holds no data. Replacing it replaces what lies inside, and that loses whatever those modules'
losesDatanames.Changing the AWS region of
regionIds, orvpcCidrBlock, replaces the VPC, and with it every subnet and service inside.Regionmodel.