aws-config-rdk
aws-config-rdk copied to clipboard
Not honouring parameters configuration file for generated Config Rule Resource Names
Problem
- A reproducible test case or series of steps
Easy. Just use any recent version of
rdk
todeploy
orcreate_rule_template
and take note of the AWS Config Rule "Name" value. It is not what is configured in theparameters.json
file under theParameters.RuleName
field as expected but the actual directory name it discovers the file within
This can be clearly seen in the source: https://github.com/awslabs/aws-config-rdk/blob/ff944bc5a3e0e8824c166824a08a74df71a5fcdc/rdk/rdk.py#L3319-L3328
-
The version of our code being used This is seen in latest: https://github.com/awslabs/aws-config-rdk/releases/tag/0.12.0 but no doubt extends for the lifespan of this solution
-
Any modifications you've made relevant to the bug None
-
Anything unusual about your environment or deployment None, this will occur in a stock, clean build environment
Suggestion
Extend a method that is used to actually read the configured RuleName value from the parameters.json file during Resource instance creation, rather than the directory name.
It would be nice to use that name consistently throughout the framework however I can see it is used and referenced heavily throughout as an index for many other mappings so it's probably easiest to just perform this step at some point where it parses the JSON config and generate a new class property to capture/hold this PublishedRuleName
or something akin