-
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
Security group woes launching EMR into a private subnet #5413
Comments
Here's a thought: when deleting an EMR cluster, terraform should wait for the cluster to shut down, then revoke all rules from the (managed) SGs associated with it. It's kind of weird, but then because the cluster depends on those SGs, terraform should be able to proceed and delete those SGs with no issue (the circular rules are now gone). Perhaps hide it behind a flag on the cluster like Does that seem too wild? |
The resource should be doing this. If its not, we should update the resource to do this. |
@bflad sorry, I didn't mean to imply that it doesn't. I meant that the TF "delete an EMR cluster" process should wait for the cluster to shut down (it already does this), and then revoke all rules attached to its managed security groups (this is what I'm proposing to add). Which I think is pretty weird for a TF resource to do (usually there's a better separation of concerns and deleting the SG rules would be up to the SG resources), but I don't see any other clean way to make this work. |
Another option here might be to expand the meaning of |
was this issue ever resolved? found this thread while experiencing the same thing. edit - apparently so. |
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
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. |
Community Note
Terraform Version
0.11.7 and AWS plugin 1.25.0
Affected Resource(s)
Issue description
Sorry for not providing a full repro here, but it's more of a conceptual problem. Let me describe the scenario:
service_access_security_group
) for its own private ENI to hit the master/worker SGs.revoke_rules_on_delete = true
on all three SGs.The pain arises because terraform needs to revoke rules on all three SGs before it can delete any of them, because they're basically a trollish knot of mutual references, and the API won't let us delete the service SG until the master/worker SGs don't refer to it anymore, and Terraform doesn't know about the mutual references. Furthermore, if I try to help it out with
depends_on
between the SGs, it complains (correctly) that there's a cycle. But that's because there's actually a cycle in the underlying resources, created by AWS.What's a good solution here?
References
The text was updated successfully, but these errors were encountered: