-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in updating
spec.inlinePolicies
(#81)
The bug occurs when updating an existing item in `spec.inlinePolicies`. The code incorrectly includes both the old(to remove) and new(to add)values when using `lo.Difference`. This causes the code to first attempt to replace the xisting policies with a call to `iam::PutRolePolicy` and then mistakenly "delete" them right after. This patch fixes this bug by calling `lo.Find` to double check whether we need to keep an inline policy (if it only needs to be updated) By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
- Loading branch information
Showing
2 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters