Closed
Description
Given a template that has a resource with no Properties (just Type
)
{
"Resources": {
"IamUser1": {
"Type": "AWS::IAM::User"
}
}
}
The following assertion should pass but throws the error Template has 1 resources with type AWS::IAM::User, but none match as expected
.
Template.fromStack(stack).hasResourceProperties('AWS::IAM::User', {
UserName: Match.absentProperty(),
});
Similarly, the assertion -
Template.fromStack(stack).hasResourceProperties('AWS::IAM::User', Match.not({
UserName: 'MyUser',
}));
The workaround is to do -
Templte.fromStack(stack).hasResource('AWS::IAM::User', {
Properties: Match.absentProperty(),
});
This is 🐛 Bug Report
Activity