You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: allow configuring of additional security group rules (#38)
## what
- This PR makes it possible to optionally add additional security group
rules to the main security group
- We add the following:
- A new tf resource `aws_security_group_rule.additonal`, which loops
over...
- A new tf variable `var.additional_security_group_rules` of type map
- Additions to the README.md
## why
- By allowing the configuration of sg rules directly in this module, we
do not require the module user to create additional security groups
outside this module. This is especially useful for those users that
consume this module with terragrunt, who may not have the ability to
easily create additional security groups
## references
- N/A, but as a user of downstream module
[terraform-aws-tailscale](https://github.com/masterpointio/terraform-aws-tailscale),
I would be delighted with this addition. If accepted, I will follow-up
with a PR in that module as well
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added support for defining additional security group rules via a new
input variable.
- **Documentation**
- Updated documentation to include details about the new resource and
input variable for additional security group rules.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
| <aname="input_additional_security_group_ids"></a> [additional\_security\_group\_ids](#input\_additional\_security\_group\_ids)| Security groups that will be attached to the app instances |`list(string)`|`[]`| no |
134
+
| <aname="input_additional_security_group_rules"></a> [additional\_security\_group\_rules](#input\_additional\_security\_group\_rules)| Additional security group rules that will be attached to the primary security group | <pre>map(object({<br/> type = string<br/> from_port = number<br/> to_port = number<br/> protocol = string<br/><br/> description = optional(string)<br/> cidr_blocks = optional(list(string))<br/> ipv6_cidr_blocks = optional(list(string))<br/> prefix_list_ids = optional(list(string))<br/> self = optional(bool)<br/> }))</pre> |`{}`| no |
133
135
| <aname="input_additional_tag_map"></a> [additional\_tag\_map](#input\_additional\_tag\_map)| Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.<br/>This is for some rare cases where resources want additional configuration of tags<br/>and therefore take a list of maps with tag key, value, and additional configuration. |`map(string)`|`{}`| no |
134
136
| <aname="input_ami"></a> [ami](#input\_ami)| The AMI to use for the SSM Agent EC2 Instance. If not provided, the latest Amazon Linux 2023 AMI will be used. Note: This will update periodically as AWS releases updates to their AL2023 AMI. Pin to a specific AMI if you would like to avoid these updates. |`string`|`""`| no |
135
137
| <aname="input_architecture"></a> [architecture](#input\_architecture)| The architecture of the AMI (e.g., x86\_64, arm64) |`string`|`"arm64"`| no |
0 commit comments