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

security group being created even if the security_group_ids is empty #192

Open
danielaraujobc opened this issue Jan 6, 2025 · 0 comments
Labels
bug 🐛 An issue with the system

Comments

@danielaraujobc
Copy link

Describe the Bug

The "default" module security group is being created even if the parameter security_group_ids is empty. From what I saw, this SG will be made if these security_group_ids are filled with the allowed SGs to inbound.

For reference, in the line 193 only creates the SG with the ingress rules if security_group_ids is filled. But the same is not happening with the "egress" rules.

resource "aws_security_group_rule" "egress" {
[...]
}

In the end I have a SG with no inbounds

image

and a single outbound

image

Expected Behavior

If security_group_ids is empty, no Security Groups must be created.

Steps to Reproduce

Create an instance without (or empty list) the security_group_ids parameter and with the parameter associate_security_group_ids filled.

module "rds" {
  source  = "cloudposse/rds/aws"
  version = "1.1.2"
  associate_security_group_ids = ["my-existing-sg"]
}

Screenshots

No response

Environment

No response

Additional Context

No response

@danielaraujobc danielaraujobc added the bug 🐛 An issue with the system label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

1 participant