Closed kaizencc closed 2 years ago
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
There should be a way to access the Parameters of the template natively with the assertions library.
Use Case
https://github.com/aws/aws-cdk/blob/7fbf092c613f5618575b9b1a10b9e06fa36abad3/packages/%40aws-cdk/aws-autoscaling/test/scheduled-action.test.ts#L61
There are quite a few lines of code in the above example so I did not quote it all. But the idea is that if you want to assert on any parameters along with the properties, you can only use
Template.fromStack(stack).templateMatches()
which then requires you to provide the entire template. This is excess code if the user does not need to assert that the entire template is a 1-1 match.Proposed Solution
APIs similar to what is available for
hasMapping()
,hasResource()
, andhasOutput()
. Should also havefindParameters()
as well.Other
Workaround is:
This is a :rocket: Feature Request