A base class for configuration objects.

This class provides a common implementation for initializing configuration objects from a provided configuration object. It uses the Object.assign method to copy properties from the provided configuration object to the instance, allowing for easy extension by specific configuration classes.

// Define a specific configuration class by extending BaseConfig
class MyConfig extends BaseConfig {
public someProperty: string;
public anotherProperty: number;

constructor(config: ConfigType = {}) {
super(config);
this.someProperty = this.someProperty ?? "default value";
this.anotherProperty = this.anotherProperty ?? 42;
}
}

// Create an instance of the specific configuration class
const config = new MyConfig({ someProperty: "custom value" });
console.log(config.someProperty); // Output: "custom value"
console.log(config.anotherProperty); // Output: 42

Hierarchy (View Summary)

Constructors

Properties

ENABLE_VPC_ENDPOINTS?: boolean

Specify whether to disable creating VPC endpoints on the VPC.

IAM_FLOW_LOG_ROLE_NAME?: string

Specify role to provide when creating CW flow logs.

MAX_AZS?: number

Define the maximum number of AZs for the VPC.

TARGET_SUBNETS?: [string]

Specifies an optional list of subnet IDs to specifically target within the VPC.

VPC_ID?: string

Unique identifier to import/use an existing VPC instead of creating a new one.

VPC_NAME: string

The name to assign the creation of the VPC.

"OSML-VPC"