@zarpay/zar-cdk-lib - v0.32.0
    Preparing search index...

    Function generateTargetGroupName

    • Generates a target group name with 32-char limit handling. Format: {appName}-{env}-{serviceName}-{color} or truncated with hash if too long.

      Parameters

      • appName: string

        Application name

      • deployEnvironment: string

        Deployment environment

      • serviceName: string

        Service name

      • color: string

        Target group color (e.g., 'Blue', 'Green')

      Returns string

      Target group name, max 32 characters

      generateTargetGroupName('ZarCore', 'staging', 'web', 'Blue');
      // → 'ZarCore-staging-web-Blue' (24 chars, fits)

      generateTargetGroupName('VeryLongAppName', 'development', 'api', 'Blue');
      // → truncated with 4-char hash for uniqueness