@gradientedge/cdk-utils 9.14.0 → 9.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -106,7 +106,7 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
106
106
|
*/
|
|
107
107
|
createApiToEventBridgeTargetEventBus() {
|
|
108
108
|
if (this.props.api.useExisting) {
|
|
109
|
-
this.apiEvent.eventBus = aws_events_1.EventBus.fromEventBusName(this, `${this.id}-event-bus`, this.resourceNameFormatter.format(this.props.event.eventBusName ?? 'default'));
|
|
109
|
+
this.apiEvent.eventBus = aws_events_1.EventBus.fromEventBusName(this, `${this.id}-event-bus`, this.resourceNameFormatter.format(this.props.event.eventBusName ?? 'default', this.props.resourceNameOptions?.eventbridgeBus));
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
112
|
this.apiEvent.eventBus = this.eventManager.createEventBus(`${this.id}-event-bus`, this, {
|
|
@@ -40,7 +40,7 @@ class EventManager {
|
|
|
40
40
|
if (!props.eventBusName)
|
|
41
41
|
throw `EventBus eventBusName undefined for ${id}`;
|
|
42
42
|
let eventBusName = props.eventBusName;
|
|
43
|
-
if (eventBusName
|
|
43
|
+
if (eventBusName != 'default') {
|
|
44
44
|
eventBusName = scope.resourceNameFormatter.format(props.eventBusName, scope.props.resourceNameOptions?.eventbridgeBus);
|
|
45
45
|
}
|
|
46
46
|
const eventBus = new aws_events_1.EventBus(scope, `${id}`, {
|
package/package.json
CHANGED
|
@@ -159,7 +159,10 @@ export class ApiToEventBridgeTarget extends CommonConstruct {
|
|
|
159
159
|
this.apiEvent.eventBus = EventBus.fromEventBusName(
|
|
160
160
|
this,
|
|
161
161
|
`${this.id}-event-bus`,
|
|
162
|
-
this.resourceNameFormatter.format(
|
|
162
|
+
this.resourceNameFormatter.format(
|
|
163
|
+
this.props.event.eventBusName ?? 'default',
|
|
164
|
+
this.props.resourceNameOptions?.eventbridgeBus
|
|
165
|
+
)
|
|
163
166
|
)
|
|
164
167
|
return
|
|
165
168
|
}
|
|
@@ -46,7 +46,7 @@ export class EventManager {
|
|
|
46
46
|
if (!props.eventBusName) throw `EventBus eventBusName undefined for ${id}`
|
|
47
47
|
|
|
48
48
|
let eventBusName = props.eventBusName
|
|
49
|
-
if (eventBusName
|
|
49
|
+
if (eventBusName != 'default') {
|
|
50
50
|
eventBusName = scope.resourceNameFormatter.format(
|
|
51
51
|
props.eventBusName,
|
|
52
52
|
scope.props.resourceNameOptions?.eventbridgeBus
|