AwsEcsEnvironmentModule
Hierarchy
- AModule<AwsEcsEnvironmentModuleSchema, Environment>
- AwsEcsEnvironmentModule
Index
Constructors
Properties
Methods
Resources
Constructors
constructor
Parameters
moduleId: string
The ID this module is loaded under.
Returns AwsEcsEnvironmentModule
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
Creates the environment and its environment variables, and anchors the ECS cluster it maps to.
Parameters
inputs: AwsEcsEnvironmentModuleSchema
Returns Promise<AwsEcsEnvironment>
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[]
registerMetadata
Resolves the account, region, and the name of the ECS cluster this environment's executions run on.
Parameters
inputs: AwsEcsEnvironmentModuleSchema
Returns Promise<{ awsAccountId: string; awsRegionId: string; clusterName: string }>
AwsEcsEnvironmentModulecreates the ECS cluster of one environment in a region, such as staging or production, with theenvironmentVariablesevery execution in it gets.Nothing: an ECS cluster is free, and its executions bill their own tasks.
A replacement recreates the cluster, and every service in it is recreated with it.
TypeScript
Modules/Environment/AwsEcsEnvironment
environmentVariablesreach every execution in the environment as plain text: a secret set here is readable by anyone who can read the task definition.The cluster has Container Insights off, so it publishes no per-task CPU, memory or network metrics beyond what ECS reports itself.
Nothing of its own. Replacing it replaces its executions, and that loses whatever their
losesDatanames.Changing
environmentNameorregionreplaces the cluster and every service in it. ChangingenvironmentVariablesrolls each service onto a new task definition.Environmentmodel.