-
Notifications
You must be signed in to change notification settings - Fork 187
Closed
Labels
enhancementNew feature or requestNew feature or requestneeds-researchneeds-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.
Description
Is your feature request related to a problem? Please describe.
For many resources in CloudFormation, a property block can be defined as a JSON string, rather than a nested block. This makes it impossible to inspect a specific sub-property and enforce a ruleset against it.
Describe the solution you'd like
Add a set of in-built functions that could perform a text-based manipulation, which could include JSON parsing, URL encoding/decoding, and a Regex-style replacement.
when %my_variable is_string {
let my_parsed_variable = jsonparse %my_variable
}
let my_parsed_variable = urldecode %my_variable
let my_parsed_variable = regexreplace /ab(cd)ef/ %my_variable 'zy$1vu'
Describe alternatives you've considered
Something out-of-band probably, or some complex Regex magic if I hated myself enough.
Additional context
khapp, pjshort22, akumar-99, carmennavarreteh and yukihiko-shinoda
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestneeds-researchneeds-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.