(core): expose the policy validation report programmatically
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
The policy validation feature can output the report in two ways, depending on the user's choice: pretty printed to the console, or saved in JSON format to a file in the cloud assembly directory.
Expose this report also programmatically (as a property of the `CloudAseembly` class, for example). The ability to convert the report to a pretty printed string should also be available.
### Use Case
Currently, the default is to show the pretty printed report only. To change this behavior, users have to set the feature flag `"@aws-cdk/core:validationReportJson": true`. If the user then wants to inspect this report programmatically, they have to read the file that was just written by the CLI.
Having it ready to be consumed directly from the framework would simplify this workflow, without any need to set any flag or read any file.
Contributor guide
Research direction
Start by tracing policy validation report generation and the CloudAssembly entry point, then compare the existing pretty-printed console output with the JSON file written to the cloud assembly directory. Done means consumers can access the report programmatically and convert it to a pretty-printed string without enabling the feature flag or reading a file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100