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

Optional or no egress rule in default security group #117

Open
wilkej opened this issue Jun 2, 2021 · 2 comments
Open

Optional or no egress rule in default security group #117

wilkej opened this issue Jun 2, 2021 · 2 comments

Comments

@wilkej
Copy link

wilkej commented Jun 2, 2021

Describe the Feature

In our pipeline for terraform we ran tf_sec as well which marks a outbound sg rule with protocol -1 and cidr blocks 0.0.0.0/0

A RDS Security Group doesn't need a outbound rule as the SGs are stateful. therefore all requests will be answered and the db itself will not initate a connection

Use Case

use the module and check it with tf_sec without findings

Describe Ideal Solution

  1. It would be ideal if it is possible to decide if the outbound / egress rule shall be created
  2. or optional define the cidr blocks, ports and protocols for the rule

Alternatives Considered

Explain what alternative solutions or features you've considered.

Additional Context

relates to this resource

resource "aws_security_group_rule" "egress" {
  count             = module.this.enabled ? 1 : 0
  description       = "Allow all egress traffic"
  type              = "egress"
  from_port         = 0
  to_port           = 0
  protocol          = "-1"
  cidr_blocks       = ["0.0.0.0/0"]
  security_group_id = join("", aws_security_group.default.*.id)
}
@nitrocode
Copy link
Member

This is being worked on with major refactoring taking place in the https://github.com/cloudposse/terraform-aws-security-group module. Once the open PRs there are merged and this repo uses that module, then it will be much easier to overwrite this rule.

@drselump14
Copy link

Are we still waiting for the terraform-aws-security-group module to be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants