8000 Fix deletion of AWS::IAM::Policy by dominikschubert · Pull Request #9092 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

Fix deletion of AWS::IAM::Policy #9092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 12, 2023
Merged

Fix deletion of AWS::IAM::Policy #9092

merged 4 commits into from
Sep 12, 2023

Conversation

dominikschubert
Copy link
Member
@dominikschubert dominikschubert commented Sep 7, 2023

Motivation

When working on other tasks, I noticed the AWS::IAM::Policy usually fails to clean up leading to a lot of cleanup issues since other resources usually depend on this resource. It seems this was also implemented wrong in the original GenericBaseModel version.

Changes

  • Add proper delete for AWS::IAM::Policy
  • Add test for a broken delete where resources need to be orphaned to "unblock" the delete.
  • Fix transformers, so that it won't try to do a reference replacement with "" values

@dominikschubert dominikschubert self-assigned this Sep 7, 2023
@dominikschubert dominikschubert added the semver: patch Non-breaking changes which can be included in patch releases label Sep 7, 2023
@github-actions
Copy link
github-actions bot commented Sep 7, 2023

LocalStack Community integration with Pro

       2 files         2 suites   1h 25m 27s ⏱️
2 170 tests 1 671 ✔️ 499 💤 0
2 171 runs  1 671 ✔️ 500 💤 0

Results for commit c2243b0.

match progress_event.status:
case OperationStatus.FAILED:
stack.set_resource_status(resource_id, f"{stack_action}_FAILED")
# TODO: remove exception raising here?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently we still need to raise otherwise the enclosing loop in the template deployer won't properly set the stack/resource states

@dominikschubert dominikschubert marked this pull request as ready for review September 12, 2023 16:15
Copy link
Member
@pinzon pinzon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dominikschubert dominikschubert merged commit 982da5d into master Sep 12, 2023
@dominikschubert dominikschubert deleted the fix_cfn-iam-policy branch September 12, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0