Skip to content
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

Better check during planning of security group rules when large number of rules #1885

Closed
hashibot opened this issue Oct 13, 2017 · 5 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.

Comments

@hashibot
Copy link

hashibot commented Oct 13, 2017

This issue was originally opened by @DevilWAH as hashicorp/terraform#16309. It was migrated here as a result of the provider split. The original body of the issue is below.


Hi there,

Expected Behavior

When i run a plan of my changes after adding new rules to a security group, I am told that it is all ok and "new resources" will be created. and I expect when I run apply this will be successful.

Actual Behavior

If the change increased the number of security rules above the limit for the security group the old rules may get deleted but fail to get recreated due to the limits being reached. So it is not just the "changes" that might not be applied but because it it doing a destroy / create operation you can end up losing rules already in place. Is there any way during the plan phase the user can be notified if the rule base will be exceeded. We use a lot of CIDR list variables so adding a single IP any results in 5-10 rules being created and it can have serious impact if the apply fails in production.

@gwohletz
Copy link

+1 on this, even an option to give you a count of the number of rules the plan will result in would be helpful

@radeksimko radeksimko added the service/ec2 Issues and PRs that pertain to the ec2 service. label Jan 28, 2018
@bflad
Copy link
Contributor

bflad commented Jul 10, 2018

It is probably worth noting that as of version 1.27.0 of the AWS provider, likely releasing tomorrow, that the security group rule handling within a single aws_security_group resource has been improved to authorize and revoke only changed individual ingress/egress rules despite their configuration grouping (e.g. replacing an individual element in a multiple element cidr_blocks list). This should help reduce scenarios where the AWS provider is revoking rules unnecessarily during updates.

@varks
Copy link

varks commented May 10, 2020

@bflad This issue doesn't seem to be resolved. Within a single aws_security_group, replacing an individual element in multiple element cidr_block list, would still revoke all the rules first before updating it accordingly.

@github-actions
Copy link

github-actions bot commented May 1, 2022

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!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label May 1, 2022
@github-actions
Copy link

github-actions bot commented Jul 1, 2022

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

No branches or pull requests

5 participants