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

allowed_security_groups not working as intended #80

Open
major0 opened this issue Dec 12, 2023 · 2 comments
Open

allowed_security_groups not working as intended #80

major0 opened this issue Dec 12, 2023 · 2 comments
Labels
bug 🐛 An issue with the system

Comments

@major0
Copy link

major0 commented Dec 12, 2023

Describe the Bug

The allowed_security_groups does not allow passing an SG to allow specific traffic from specific IPs. E.g. for dev testing in a dev environment.

The problem is that the allowed_security_group id's are being attached as a source for the default security group, which makes little to no sense. These ID's should be passed to aws_docdb_cluster directly:

E.g.

  vpc_security_group_ids          = concat(join("", aws_security_group.default[*].id)], var.allowed_security_groups)

Expected Behavior

I expect that should I pass an allowed_security_group id that the rules in that security group would be applied.

Steps to Reproduce

Simply pass a security group that allows ingress from an IP range and test, it wont work.

Screenshots

No response

Environment

No response

Additional Context

No response

@major0 major0 added the bug 🐛 An issue with the system label Dec 12, 2023
@kevcube
Copy link
Contributor

kevcube commented Dec 12, 2023

@major0 this flag is working as intended. The list that is passed in is a list of security groups that will be allowed into the documentDB's created security group.

It sounds like what you are looking for is a parameter to specify external_security_group_id_list like what was added in #69. Unfortunately this merge didn't trigger an auto-release, still not sure why, so please reference the latest commit as your module version to test it out. If it's what you need I can look into manually creating a release including it.

If what you're looking for is something different, then I'd be happy to review a contribution which adds it.

@RamazanBiyik77
Copy link

Similar thing happen to me. I created a security group and gave as dependency to that module. Unfortunately it doesn't pick the sg that i gave. It picked the sg that created automatically. I tried to change sg manually. When i applied it again , it takes auto created sg again. So I used external_security_group_id_list. That solved my problem. However 2 security group added to my cluster. Auto created sg has no inbound so it doesnt change anything.
1-) Auto created sg
2-) My sg

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

3 participants