cdklabs/cdk-monitoring-constructs

Composite alarms do not adhere to disambiguator

openwebsolns opened this issue · 0 comments

Version

3.1.2

Steps and/or minimal code example to reproduce

Consider the MonitoringFacade below with default action and disambiguator action:

monitor = new MonitoringFacade(this, "Monitor", {
  ...props,
  alarmDefaults: {
    action: defaultAction(),
    disambiguatorAction: {
      Critical: criticalAction(),
    },
  },
});

monitor.createCompositeAlarmUsingTag(ROLLBACK_TAG, {
  disambiguator: "Critical",
});

Expected behavior

The composite alarm created should be using criticalAction().

Actual behavior

The composite alarm created is using defaultAction()

Other details

The 🐛 appears to be the way action is calculated: