AwsSingleAzRegionModule
Hierarchy
- AModule<AwsSingleAzRegionModuleSchema, AwsSingleAzRegion>
- AwsSingleAzRegionModule
Index
Constructors
Properties
Methods
Resources
Constructors
constructor
Parameters
moduleId: string
The ID this module is loaded under.
Returns AwsSingleAzRegionModule
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 in a single availability zone.
Parameters
inputs: AwsSingleAzRegionModuleSchema
Returns Promise<AwsSingleAzRegion>
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: AwsSingleAzRegionModuleSchema
The inputs this module was loaded with.
Returns Promise<Record<string, unknown>>
AwsSingleAzRegionModulecreates a VPC and its internet gateway in one availability zone of an AWS region (regionId,vpcCidrBlock).Nothing: a VPC and an internet gateway are free. What runs inside the region 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.
TypeScript
Modules/Region/AwsSingleAzRegion
One availability zone: an outage of that zone takes down everything in the region. A load balancer from
AwsEcsAlbServiceModuleneeds two zones, fromAwsMultiAzRegionModule.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
regionIdorvpcCidrBlockreplaces the VPC, and with it every subnet and service inside.Regionmodel.