krystal / terraform-provider-katapult

Terraform Provider for Katapult.
https://registry.terraform.io/providers/krystal/katapult/latest/docs
MIT License
5 stars 2 forks source link

Add `katapult_security_group_rules` resource #99

Open jimeh opened 1 year ago

jimeh commented 1 year ago

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.