Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-events: Enable schema discovery for Event Bus #26480

Open
1 task done
iRoachie opened this issue Jul 24, 2023 · 4 comments · May be fixed by #32739
Open
1 task done

aws-events: Enable schema discovery for Event Bus #26480

iRoachie opened this issue Jul 24, 2023 · 4 comments · May be fixed by #32739
Labels
@aws-cdk/aws-events Related to CloudWatch Events effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@iRoachie
Copy link
Contributor

iRoachie commented Jul 24, 2023

Describe the feature

The current EventBus construct doesn't allow enabling schema discovery.

Use Case

Need to enable schema discovery for an event bus without using L1 constructs.

Proposed Solution

This behaviour is supported in Cloudformation through AWS::EventSchemas::Discoverer.

This should be easily implemented on the EventBus.

e.g

const eventBus = new EventBus(this, 'poll-events', {
  schemaDiscovery: true
});

or to enable tagging we can do:

const eventBus = new EventBus(this, 'poll-events')

const discoverer = eventBus.addDiscoverer()

cdk.Tags.of(discoverer).add('my-tag', 'yup')

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request

CDK version used

2.88.0

Environment details (OS name and version, etc.)

Mac OS 13.4.1

@iRoachie iRoachie added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jul 24, 2023
@github-actions github-actions bot added the @aws-cdk/aws-events Related to CloudWatch Events label Jul 24, 2023
@pahud
Copy link
Contributor

pahud commented Jul 24, 2023

Sounds like we'll need to create a new L2 for AWS::EventSchemas::Discoverer or just create CfnDiscoverer L1 in EventBus L2?

@pahud pahud added p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jul 24, 2023
@iRoachie
Copy link
Contributor Author

I'm thinking the latter

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jul 24, 2023
@rrhodes
Copy link
Contributor

rrhodes commented Jan 4, 2025

Hi, I'm working on a PR for this addition to the Event Bus L2 construct. I think it makes sense to leverage the L1 Discoverer construct rather than introducing a new L2 one, but happy to discuss further if there's any strong objections.

@rrhodes rrhodes linked a pull request Jan 4, 2025 that will close this issue
1 task
@rrhodes
Copy link
Contributor

rrhodes commented Jan 5, 2025

Reviewing this further, I think an L2 construct may be preferable after all. We need to pass in supported properties for schema discovery (e.g. crossAccount). I initially set up a new Props interface but then if we want to swap that out for an L2 construct in future this would be a breaking change.

I'd like to hear thoughts from the CDK community before I proceed: should we make an L2 construct a requirement before addressing this issue, or do we think there are workarounds with L1 that could avoid a breaking change? I see L2 is tracked since 2020.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-events Related to CloudWatch Events effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants