@finnairoyj/cdk-constructs-lib
    Preparing search index...

    Interface DatabaseSecretProps

    Set of common properties passed to most Stacks and Constructs

    interface DatabaseSecretProps {
        applicationId: string;
        dbClusterIdentifier: string;
        dbMasterCredentialsSecret?: ISecret;
        dbname: string;
        dbPasswordExcludeCharacters?: string;
        engine: string;
        environment: "dev" | "test" | "preprod" | "prod" | "tools" | "sandbox";
        host: string;
        isMasterUser?: boolean;
        kmsKey: IKey;
        passwordLength?: number;
        port: number;
        provisionUserInDb?: boolean;
        resourcePrefix: string;
        sqlExecutorLambda?: IFunction;
        userAccessLevel?: DbUserAccessLevel;
        username: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    applicationId: string

    Application identifier to be used as prefix in secret names

    dbClusterIdentifier: string

    Database cluster ID

    dbMasterCredentialsSecret?: ISecret

    For non-master users, dbMasterCredentialsSecret is required in order to provison the user in the database. Required for non-master users

    false
    
    dbname: string

    Name of the database

    dbPasswordExcludeCharacters?: string

    Characters to exclude from password

    ' %+~`#$&*()|[]{}:;<>?!\'/@"\\'
    
    engine: string

    DB engine

    environment: "dev" | "test" | "preprod" | "prod" | "tools" | "sandbox"

    Infrastructure environment

    host: string

    DB hostname

    isMasterUser?: boolean

    Create a master secret for the RDS cluster.

    Secret name pattern for master user is: ${applicationName}/database/${dbClusterId}/master

    For regular (non-master) user the pattern is relative to the database: ${applicationName}/database/${dbClusterId}/${dbname}/username

    Underscores in usernames are replaced with hyphen '-'

    kmsKey: IKey

    KMS key for encrypting the Secret

    passwordLength?: number
    32
    
    port: number

    DB port

    provisionUserInDb?: boolean

    Automatically provision the user in the database with given access level.

    userAccessLevel is required if set to true

    false
    
    resourcePrefix: string

    Resource name prefix, commonly applied to auto-generated resource names

    sqlExecutorLambda?: IFunction

    Shared SQL Executor custom resource Lambda. Required for provisioning the user in the database

    userAccessLevel?: DbUserAccessLevel

    User access level for regular users

    READ_WRITE
    
    username: string

    Username