Skip to content

Commit 89ff945

Browse files
authored
feat: property injection for 122 constructs (#33887)
### Issue # (if applicable) This Implements the Property Injectors RFC. https://github.com/aws/aws-cdk-rfcs/blob/main/text/0693-property-injection.md ### Reason for this change Implement the Property Injectors feature so orgs can set up default Construct props values. ### Description of changes Key changes: * propertyInjectionDecorator to make a Construct Property Injectable. * applyInjectors is called from Construct's constructor to inject property defaults. * IPropertyInjector defines an Property Injector. * PropertyInjectors class that stores the map of Constructs to Injectors. * App, Stage, and Stack now has a new propertyInjectors property. ### Describe any new or updated permissions being added None ### Description of how you validated changes * Unit test in core/test/prop-injectors.test.ts * Use `yarn package --target js` to create a library and write Injectors for Constructs. ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 8ab2606 commit 89ff945

File tree

138 files changed

+4051
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+4051
-5
lines changed

packages/@aws-cdk-testing/framework-integ/test/core/test/integ.prop-injectors.js.snapshot/PropertyInjectorTestDefaultTestDeployAssert271A71E2.assets.json

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/core/test/integ.prop-injectors.js.snapshot/PropertyInjectorTestDefaultTestDeployAssert271A71E2.template.json

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/core/test/integ.prop-injectors.js.snapshot/TestStack.assets.json

+48
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)