-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): enable additional metadata collection (under feature flag) (
#32827) ### Issue # (if applicable) Closes #<issue number here>. ### Reason for this change Expand the scope of usage data collected by the AWS CDK to better inform CDK development and improve communication for security concerns and emerging issues. Currently, for those that opt in, the CDK collects usage data on your CDK version and which L2 constructs you use. For more information on current CDK behavior, see [Version Reporting](https://docs.aws.amazon.com/cdk/v2/guide/cli.html#version_reporting). This proposal expands the scope of usage data collection to include the following from L2 constructs in CDK applications: * Property keys - Collect which property keys you use from the L2 constructs in your app. This includes property keys nested in dictionary objects. * Property values of Boolean and enum types - Collect property key values of only Boolean and enum types. All other types, such as string values or construct references will be redacted. * Method name, keys, and property values of Boolean and ENUM types - When you use an L2 construct method, we will collect the method name, property keys, and property values of of Boolean and enum types ### Description of changes Update CDK synthesis code to additionally handle resource metadata. On feature flag set to true, synthesis will not only inject Metadata usage like version and construct name, it will additionally look for any construct/method/feature flag metadata injected during resource creation. Note that this PR is only part one so we will have follow up PRs to add metadata injection during resource creation. On feature flag set to false, it should be the same as before. ### Describe any new or updated permissions being added N/A ### Description of how you validated changes New unit tests added. New integration tests added. ### 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* --------- Co-authored-by: AWS CDK Team <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Kaizen Conroy <[email protected]> Co-authored-by: Momo Kornher <[email protected]> Co-authored-by: Kazuho Cryer-Shinozuka <[email protected]> Co-authored-by: Grace Luo <[email protected]> Co-authored-by: Ian Hou <[email protected]>
- Loading branch information
1 parent
bb59b5a
commit 54167b5
Showing
76 changed files
with
1,685 additions
and
891 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...g.environment.js.snapshot/appconfigenvironmentDefaultTestDeployAssert75BD28E7.assets.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
...st/aws-appconfig/test/integ.environment.js.snapshot/aws-appconfig-environment.assets.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...cdk-testing/framework-integ/test/aws-appconfig/test/integ.environment.js.snapshot/cdk.out
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...-testing/framework-integ/test/aws-appconfig/test/integ.environment.js.snapshot/integ.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
13 changes: 2 additions & 11 deletions
13
...sting/framework-integ/test/aws-appconfig/test/integ.environment.js.snapshot/manifest.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.