MDAA TS Docs
    Preparing search index...

    Class MdaaDefaultResourceNaming

    A default MDAA Naming implementation

    Implements

    Index

    Constructors

    Properties

    Configuration properties containing organizational context and CDK node access for the naming implementation

    INCLUDE_ENV_IN_SSM_PATH_CONTEXT_KEY: "@mdaaIncludeEnvInSsmPath" = '@mdaaIncludeEnvInSsmPath'

    When set to true (or the string "true"), env is included in SSM parameter paths and CloudFormation export names. This prevents collisions when the same module is deployed to multiple environments within a single AWS account. Defaults to false when absent; any value other than true/false is rejected as an error.

    Methods

    • Generates a export name in the format of ::<module_name>. When the @mdaaIncludeEnvInSsmPath context flag is enabled, env is inserted after domain, producing :::<module_name> to keep export names parallel with ssmPath() and avoid cross-environment collisions within one account.

      Parameters

      • path: string

      Returns string

    • Generates a resource name in the format of ---<module_name>

      Parameters

      • OptionalresourceNameSuffix: string

        Optional naming suffix to be added to the generated resource name. Useful when multiple resources of the same type are created within the same stack.

      • OptionalmaxLength: number

        Should be used to truncate the generated resource names to a specified length. The result should still be unique and stable. Caution: Known bug - names exactly equal to maxLength are unnecessarily truncated with hash suffix (should use > instead of >=). Left unfixed to prevent breaking existing deployments that rely on this behavior. Cosmetic issue only - does not affect infrastructure functionality.

      Returns string

    • Generates a ssm param name in the format of ///<module_name>. When the @mdaaIncludeEnvInSsmPath context flag is enabled, env is inserted after domain, producing ////<module_name> to avoid cross-environment collisions when the same module is deployed to multiple environments in one account.

      Parameters

      • path: string
      • includeModuleName: boolean = true
      • lowerCase: boolean = true

      Returns string

    • Generates a stack name in the format of ---<module_name>. Sanitizes non-alpha numeric characters and replaces underscores with '-'

      Parameters

      • OptionalstackNameSuffix: string

      Returns string

    • Parameters

      • component: string

      Returns string