cdk-monitoring-constructs icon indicating copy to clipboard operation
cdk-monitoring-constructs copied to clipboard

Composite alarms do not adhere to disambiguator

Open openwebsolns opened this issue 2 years ago • 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 :bug: appears to be the way action is calculated:

openwebsolns avatar May 09 '23 23:05 openwebsolns