-
Notifications
You must be signed in to change notification settings - Fork 4k
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-cdk-lib: Names.uniqueId should take IConstruct instead of Construct as parameter #20584
Comments
I don't see why this wouldn't work - thanks for the feature request! Check out our contributing guide if you're interested - there's a low chance the team will be able to address this soon but we'd be happy to review a PR 🙂 |
…uct (#20584) (#20696) This updates `Names.uniqueId()` to accept an `IConstruct` instead of `Construct`. Closes #20584 ---- ### 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*
|
…uct (aws#20584) (aws#20696) This updates `Names.uniqueId()` to accept an `IConstruct` instead of `Construct`. Closes aws#20584 ---- ### 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 feature
Names.uniqueId only accepts Constructs. The method internally only works with Construct's nodes which can also be determined for IConstructs (Node.of). So it should be o.k. to pass an IConstruct.
Use Case
I use the Java-CDK and want to create a uniqueId of an IOpenIdConnectProvider, which is an IConstruct but no Construct.
In Java it's impossible to do compile that, in TypeScript it works without problems.
Proposed Solution
change the parameter type from Construct to IConstruct
Other Information
No response
Acknowledgements
CDK version used
2.26.0
Environment details (OS name and version, etc.)
Windows / Linux
The text was updated successfully, but these errors were encountered: