Add a new katapult_security_group_rules resource to compliment the existing katapult_security_group and katapult_security_group_rule resources.
The purpose of making just the rules list as a whole available as a separate resource, is to make it easy to reuse the same or similar sets of rules across multiple security groups.
Right now you either need to use complex custom locals/vars and dynamic rules in combination with a for_each loop on the katapult_security_group resource. Or you use external_rules and multiple katapult_security_group_rule resources, at the cost of losing absolute control over the full list of rules on the security group.
Add a new
katapult_security_group_rules
resource to compliment the existingkatapult_security_group
andkatapult_security_group_rule
resources.The purpose of making just the rules list as a whole available as a separate resource, is to make it easy to reuse the same or similar sets of rules across multiple security groups.
Right now you either need to use complex custom locals/vars and dynamic rules in combination with a
for_each
loop on thekatapult_security_group
resource. Or you useexternal_rules
and multiplekatapult_security_group_rule
resources, at the cost of losing absolute control over the full list of rules on the security group.