Add comma-delimiter escaping logic when persisting data into Parameter Store: this helps with resource identifiers that allow a comma, for example AWS::IAM::Role;
Expunged the currentContext.setResourceLookupId(identifier); line, that incorrectly stores the resource identifier in the callback context: not only using the callback context for the model is not needed (as it is consumable from the model across invocations), but when a pagination occurs the line above this will set the resource ID (result of the search) as what it will be the Parameter Store parameter name, which is not correct.
Tests excerpts
Unit tests excerpts
[...]
[INFO] Tests run: 74, Failures: 0, Errors: 0, Skipped: 0
[...]
[INFO] --- jacoco:0.8.9:check (jacoco-check) @ awscommunity-resource-lookup-handler ---
[...]
[INFO] Analyzed bundle 'awscommunity-resource-lookup-handler' with 10 classes
[INFO] All coverage checks have been met.
Contract tests excerpts
[...]
13 passed, 2 skipped, 9 deselected
[...]
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available:
Description of changes:
AWS::IAM::Role
;currentContext.setResourceLookupId(identifier);
line, that incorrectly stores the resource identifier in the callback context: not only using the callback context for the model is not needed (as it is consumable from the model across invocations), but when a pagination occurs the line above this will set the resource ID (result of the search) as what it will be the Parameter Store parameter name, which is not correct.Tests excerpts
Unit tests excerpts
Contract tests excerpts
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.