Skip to content

Commit

Permalink
Undefined values when rendering SQS as targets in Amazon Event Bridge #…
Browse files Browse the repository at this point in the history
…501 (#506)

* fixed undefined values

* Create kind-steaks-attack.md

---------

Co-authored-by: [email protected] <[email protected]>
Co-authored-by: David Boyne <[email protected]>
  • Loading branch information
3 people authored Apr 23, 2024
1 parent 3c399a6 commit 74ca9c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/kind-steaks-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@eventcatalog/plugin-doc-generator-amazon-eventbridge": patch
---

fix: undefined values for eventbridge plugin
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const getEventBusRulesAndTargets = (eventbridge: EventBridge, eventBusName: stri
const { Targets = [] } = await eventbridge.listTargetsByRule({ Rule: rule.name, EventBusName: eventBusName });
const targets = Targets.map(({ Arn: arnString = '' }) => {
const { service, resource, resourceName } = Arn.split(arnString, ArnFormat.SLASH_RESOURCE_SLASH_RESOURCE_NAME);
return { service, resource, resourceName, arn: arnString };
return { service, resource, resourceName: resourceName || resource, arn: arnString };
});
return { ...rule, targets };
});
Expand Down

0 comments on commit 74ca9c7

Please sign in to comment.