Skip to main content

AwsCredentialsAccountModule

AwsCredentialsAccountModule gives octo an AWS account to deploy into, signed in with an explicit access key and secret (credentials), optionally against custom endpoints.

@cost

Nothing: an account module creates no resources.

@downtime

None: it creates no resources.

@example

TypeScript

import { type App, stub } from '@quadnix/octo';
import { AwsCredentialsAccountModule } from '@quadnix/octo-aws-cdk/modules/account/aws-credentials-account';

octo.loadModule(AwsCredentialsAccountModule, 'my-account-module', {
accountId: '123456789012',
app: stub<App>('${{my-app-module.model.app}}'),
credentials: {
accessKeyId: 'EXAMPLE_KEY',
secretAccessKey: 'EXAMPLE_SECRET'
},
endpoints: { s3: 'https://s3.amazonaws.com' }, // Optional
});
@group

Modules/Account/AwsCredentialsAccount

@limit

The access key and secret are long-lived, and anyone who reads them acts as that identity: pass them from the environment, never written into octo.yaml.

@losesData

Nothing.

@replaces

Changing accountId moves every resource of the app to the other account: each is deleted in the old account and created in the new.

@see

Hierarchy

Index

Constructors

constructor

  • Parameters

    • moduleId: string

      The ID this module is loaded under.

    Returns AwsCredentialsAccountModule

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 account from the supplied credentials, and anchors it for other modules to find.


    Parameters

    Returns Promise<AwsCredentialsAccount>

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>>