-
Notifications
You must be signed in to change notification settings - Fork 343
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
[PR #592/a2be6da7 backport][stable-2] elb_classic_lb: fix - resolve security_group_ids when providing security_group_names #594
Conversation
…ity_group_names (#592) elb_classic_lb: fix - resolve security_group_ids when providing security_group_names SUMMARY Fix failed to resolve security_group_ids when providing security_group_names. Fix broken tasks in integration tests. Fixes #589. ISSUE TYPE Bugfix Pull Request COMPONENT NAME elb_classic_lb Reviewed-by: Mark Chappell <None> Reviewed-by: None <None> (cherry picked from commit a2be6da)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This fix doesn't work, if the ELB doesn't exist. The suggested fix in #589 does actually work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn NOT fix the issue in question if the ELB doesn't already exist.
@@ -744,7 +744,7 @@ def __init__(self, module): | |||
if security_group_names: | |||
# Use the subnets attached to the VPC to find which VPC we're in and | |||
# limit the search | |||
if self.elb.get('Subnets'): | |||
if self.elb.get('Subnets', None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fails if ELB doesn't exsist (even if called with state: absent
)
elb
is undefined. get()
throws error.
Replace with:
if self.elb is not None and self.elb.get('Subnets', None):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original problem is not 'Subnets'
being absent, but elb
.
This change does not fix this issue.
This is a backport of PR #592 as merged into main (a2be6da).
SUMMARY
Fix failed to resolve security_group_ids when providing security_group_names.
Fix broken tasks in integration tests.
Fixes #589.
ISSUE TYPE
COMPONENT NAME
elb_classic_lb