When working with DevOps Teams, used to develop with cloud native options, we need a smart resource that finds/creates host/group/service objects and puts them into the rule in a single resource.
In case a object is not found the provider has to create the object based on a set templates for names, tags etc, so we easily can create rules without knowing if a host, service, network object exists in the object database.
Take the azurerm_firewall_policy_rule_collection_group resource for instance. It is very easy to create a loop that creates all the element in one resource.
PS! Even if one can disable warnings and create duplicate objects, this is not a recommended approach and is still a lot more complex than the one resource approach.
When working with DevOps Teams, used to develop with cloud native options, we need a smart resource that finds/creates host/group/service objects and puts them into the rule in a single resource.
In case a object is not found the provider has to create the object based on a set templates for names, tags etc, so we easily can create rules without knowing if a host, service, network object exists in the object database.
Take the azurerm_firewall_policy_rule_collection_group resource for instance. It is very easy to create a loop that creates all the element in one resource.
PS! Even if one can disable warnings and create duplicate objects, this is not a recommended approach and is still a lot more complex than the one resource approach.