-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: eventSourceName does not accept parameters #20718
Comments
As a general question, if my PR gets merged, about how long after that would it be until I can use this from npm/yarn? I need to decide if I can wait on this for a few days or if I need to do something less ideal. |
Addresses #20718 Adds a check to see if the value is a token before running the validation regex on `eventSourceName`. Simple fix following a similar fix in #10772 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
We release a new version of CDK usually every week. your fix should be live sometime next week 🙂 Fix has been merged, so i will close this issue. |
|
Addresses aws#20718 Adds a check to see if the value is a token before running the validation regex on `eventSourceName`. Simple fix following a similar fix in aws#10772 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
I am trying to use a parameter for the
eventSourceName
part of an AWS EventBus resource, but it is failing in validation. I can set up the event bus if I give the string directly, but any method of referencing a parameter in this field fails. I haven't tried doing this in pure CFN, but I assume parameters would work in this field in pure CFN.Expected Behavior
Code should work and accept parameters for the EventSourceName.
Current Behavior
I get the following validation error:
Error: 'eventSourceName' must satisfy: /^aws\.partner(\/[\.\-_A-Za-z0-9]+){2,}$/
from the following code:
eventSourceName: partnerEventName.valueAsString
Reproduction Steps
Add the following snippet of code to any stack:
Possible Solution
Fix validation to allow tokens or CFN functions. It looks like this was fixed for
EventBusName
in #10772 but not for this field.Additional Information/Context
I'm trying to use parameters so I can deploy this to multiple different environments.
CDK CLI Version
2.23.0
Framework Version
No response
Node.js Version
v17.6.0
OS
OSX
Language
Typescript
Language Version
ts-node 10.7.0
Other information
The text was updated successfully, but these errors were encountered: