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

    Interface ServiceDatabaseProps

    interface ServiceDatabaseProps {
        createDbSQL?: string;
        createUserSQL?: string;
        dbAdminCredentials: ISecret;
        dbname?: string;
        dbUserCredentials?: ISecret;
        deleteDbSQL?: string;
        deleteUserSQL?: string;
        engine: DatabaseEngine;
        provisionUser?: boolean;
        sqlExecutorLambda?: IFunction;
    }
    Index

    Properties

    createDbSQL?: string

    Custom SQL statement for creating the DB. Secret values like passwords must be tokenized using the ExecuteSQLStatement.tokenizeSecret() function!

    Default SQL to create DB is used
    
    createUserSQL?: string

    Custom SQL statement for creating the DB user. Secret values like passwords must be tokenized using the ExecuteSQLStatement.tokenizeSecret() function!

    Default SQL to create DB user is used
    
    dbAdminCredentials: ISecret

    Database admin credentials secret. Must be in the JSON format that included DB connection details

    dbname?: string

    Name of the database to be created. Allowed only if 'dbUserCredentials' value is not provided

    dbname is resolved from the 'dbUserCredentials' secret
    
    dbUserCredentials?: ISecret

    Database user credentials secret. Must be in the JSON format that included DB connection details, including the name of the new database to be created.

    deleteDbSQL?: string

    SQL statement to execute when the ServiceDatabase resource is deleted

    DANGER! Possible data loss if DROP DATABASE or similar statement is used here

    No SQL is executed on resource delete
    
    deleteUserSQL?: string

    SQL statement to execute when the database user resource is deleted

    DANGER! Possible loss of access to service / user if DROP USER or similar statement is used here

    No SQL is executed on resource delete
    

    Database engine. 'mysql' and 'postgres' are supported

    provisionUser?: boolean

    Provision the DB user in the database

    true - DB user will be created
    
    sqlExecutorLambda?: IFunction

    Common SQL executor Lambda function. If not provided, dedicated Lambda function will be created

    New Lambda function will be created