-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/aws_alb: Cleanup ENIs after deleting ALB #1427
Conversation
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.
Looks good to me! :)
Just left 2 small comments :)
aws/resource_aws_alb.go
Outdated
@@ -401,6 +402,62 @@ func resourceAwsAlbDelete(d *schema.ResourceData, meta interface{}) error { | |||
return fmt.Errorf("Error deleting ALB: %s", err) | |||
} | |||
|
|||
err := cleanupALBNetworkInterfaces(meta.(*AWSClient).ec2conn, d.Id()) | |||
if err != nil { | |||
log.Printf("[WARN] Failed to cleanup ENIs for ELB %q: %#v", d.Id(), err) |
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.
Shouldn't it be ALB
instead of ELB
?
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.
Sure, I'll change it. Thanks for spotting it!
}, | ||
{ | ||
Name: aws.String("description"), | ||
Values: []*string{aws.String("ELB " + name)}, |
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.
is ALB
failing here? more a question rather than a remark :)
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 is actually intention - the underlying API uses a different naming convention, "ELB v2" they call it, so ELB is correct here in this context.
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.
Good to know, thanks! :)
28606e1
to
93d6039
Compare
…cleanup r/aws_alb: Cleanup ENIs after deleting ALB
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Similar to #1036 - just for ALBs.
Closes #40
Test results
Debug log snippet