@@ -55,38 +55,40 @@ variable "rules" {
5555 EOT
5656}
5757
58- variable "open_egress_enabled " {
58+ variable "allow_all_egress " {
5959 type = bool
6060 default = false
6161 description = <<- EOT
62- A convenience. Add to the rules in `var.rules` a rule that allows all egress.
62+ A convenience that adds to the rules in `var.rules` a rule that allows all egress.
6363 If this is false and `var.rules` does not specify any egress rules, then
6464 no egress will be allowed.
6565 EOT
6666}
6767
6868variable "rule_matrix" {
69+ # rule_matrix is independent of the `rules` input.
70+ # Only the rules specified in the `rule_matrix` object are applied to the subjects.
71+ # Schema:
72+ # {
73+ # # these top level lists define all the subjects to which rule_matrix rules will be applied
74+ # source_security_group_ids = list of source security group IDs to apply all rules to
75+ # cidr_blocks = list of ipv4 CIDR blocks to apply all rules to
76+ # ipv6_cidr_blocks= list of ipv6 CIDR blocks to apply all rules to
77+ # prefix_list_ids = list of prefix list IDs to apply all rules to
78+ # self = # set "true" to apply the rules to the created or existing security group
79+ #
80+ # # each rule in the rules list will be applied to every subject defined above
81+ # rules = [{
82+ # type = "egress"
83+ # from_port = 0
84+ # to_port = 65535
85+ # protocol = "all"
86+ # description = "Allow full egress"
87+ # }]
88+
6989 type = any
7090 default = { rules = [] }
7191 description = <<- EOT
72- A convenience. Apply the same list of rules to all the provided security groups and CIDRs and self.
73- Type is object as specified in the default, but keys are optional except for `rules`.
74- The `rules` list is a list of maps that are fully compatible with the `aws_security_group_rule` resource,
75- but any keys already at the top level will be ignored. Rules keys listed in the default are required, except for `description`.
76- All elements of the list must have the same set of keys and each key must have a consistent value type.
77- Example:
78- {
79- source_security_group_ids = []
80- cidr_blocks= []
81- ipv6_cidr_blocks= []
82- prefix_list_ids = []
83- self = true
84- rules = [{
85- type = "egress"
86- from_port = 0
87- to_port = 65535
88- protocol = "all"
89- description = "Allow full egress"
90- }]
92+ A convenient way to apply the same set of rules to a set of subjects. See README for details.
9193 EOT
9294}
0 commit comments