Skip to main content

SimpleAppModule

SimpleAppModule names the app (name), the root node every other module hangs from; it creates no resources.

@cost

Nothing: it creates no resources.

@downtime

None: it creates no resources.

@example

TypeScript

import { SimpleAppModule } from '@quadnix/octo-aws-cdk/modules/app/simple-app';

octo.loadModule(SimpleAppModule, 'my-app-module', { name: 'test-app' });
@group

Modules/App/SimpleApp

@limit

One app per definition file; everything else in the graph hangs from it.

@losesData

Nothing of its own. Renaming the app replaces what has no provider-unique name, EFS among it, and that loses its files.

@replaces

Changing name gives every node a new id. A resource with a provider-unique name, such as a bucket, a table or a function, moves; the rest are deleted and created again: VPCs, subnets, internet and NAT gateways, route tables, network ACLs, security groups, EFS and its mount targets, ALB listeners, CloudFront invalidations and DynamoDB replicas.

@see

Hierarchy

Index

Constructors

constructor

  • Parameters

    • moduleId: string

      The ID this module is loaded under.

    Returns SimpleAppModule

Properties

readonlyinheritedmoduleId

moduleId: string

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

MODULE_PACKAGE: string

The package the module is registered under, set by Module.

staticreadonlyinheritedMODULE_SCHEMA

MODULE_SCHEMA: any

The schema of the module's inputs, set by Module.

Methods

onInit

  • Creates the root app, which every other module hangs off.


    Parameters

    Returns Promise<App>

inheritedregisterHooks

  • registerHooks(): { postCommitHooks?: PostHookSignature[]; postModelActionHooks?: PostHookSignature[]; postResourceActionHooks?: PostHookSignature[]; preCommitHooks?: PreHookSignature[]; preModelActionHooks?: PreHookSignature[]; preResourceActionHooks?: PreHookSignature[] }
  • To hook custom behavior into Octo's lifecycle for the duration of this module. Override it to return the callbacks you want run.

    @see

    Techniques for Hooks.


    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

    Returns Promise<Record<string, unknown>>