feat: Allow security group rules to reference the security group created by the module#51
feat: Allow security group rules to reference the security group created by the module#51bryantbiggs merged 4 commits intoterraform-aws-modules:masterfrom FlorinAndrei:sg-rules-with-self
Conversation
## [1.9.0](v1.8.0...v1.9.0) (2025-09-25) ### Features * Allow security group rules to reference the security group created by the module ([#51](#51)) ([42ccd24](42ccd24))
|
This PR is included in version 1.9.0 🎉 |
|
@bryantbiggs @antonbabenko I know you have other modules that could use this improvement. I'm not sure how you want to handle that. I'm a little behind the schedule right now with my projects, so I don't know how much time I'll have to spend on this topic. I'm sure you guys are far more conversant in your own code than I am, so maybe this is an easy add for you? |
|
thank you - it varies on a case by case basis. I don't know of any other modules that don't have this capability but should - but happy to review any PRs where it would be of use |
|
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
In the security group created by this module, allow rules to reference this security group itself as the source, in a manner similar to the
self = trueargument for the olderaws_security_group_ruleresource type.This is done by introducing the special value "self" for the
referenced_security_group_idof the SG rule resource. When this value is used, thenreferenced_security_group_idreceives as a value the ID of the security group created by this module.Motivation and Context
aws_vpc_security_group_ingress_ruleand its egress companion do not have aselfargument. This is reflected in the way this module is written.For clusters in general, it is a good idea to allow intra-cluster communication by default, for reasons such as replication, etc.
We have "self" type rules for the SGs of all clusters.
Breaking Changes
None.
How Has This Been Tested?
examples/*to demonstrate and validate my change(s)examples/*projectspre-commit run -aon my pull request