0.0.1 • Published 1 year ago

@rogerchi/cdk-listener-next-available-priority v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

ListenerNextAvailablePriority

This is a CDK construct which implements a custom resource that gets the next available priority in a listener. This is useful if you don't want to manually manage priorities (which are a required field for rules), mainly used in the context of host-name matching rules. Currently just supports getting one priority at a time, so you may need to set up a dependency chain if you are adding multiple rules.

Usage

const listenerNextAvailablePriority = new ListenerNextAvailablePriority(
  this,
  'next-priority',
  { listener },
);

listener.addTargets('host', {
  conditions: [ListenerCondition.hostHeaders([domainName])],
  targets: [
    /* targets here */
  ],
  priority: listenerNextAvailablePriority.nextPriority,
});
0.0.1

1 year ago

0.0.0

1 year ago