Skip to content

Commit ffec822

Browse files
author
Frank Schmid
committed
Fixes #19 - Use exact match to reduce merged IAM policy resources
1 parent 05441d0 commit ffec822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/aliasRestructureStack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ module.exports = {
407407

408408
if (sameStageStatement) {
409409
// Merge the resources
410-
sameStageStatement.Resource = _.unionWith(sameStageStatement.Resource, statement.Resource, (a,b) => _.isMatch(a,b));
410+
sameStageStatement.Resource = _.uniqWith(_.concat(sameStageStatement.Resource, statement.Resource), (a,b) => _.isEqual(a,b));
411411
} else {
412412
// Add the different statement
413413
stageRolePolicyStatements.push(statement);

0 commit comments

Comments
 (0)