Closed
Description
Support of managing multiple similar resources dynamically - depending on the specs of the primary resource.
To be able to discriminate which dependent resource we are managing the desired should receive the index of the resource:
protected R desired(P primary, Context<P> context, int index)
or inside the Context
object. (This would require an extended Context
for the dependent resources.
Questions to clarify/discuss
Should be this on top level. Thus directly the DependentResource
interface should support this?. And have a wrapper dependent resource over that, that supports count? (basically agree on class level design)
Notes
- This is analogy to
count
in terraform, see: https://www.terraform.io/language/meta-arguments/count - this issue closely related to an issue where an event source needs to support multiple secondary resources:
DependentResource
support for event sources where multiple resources of same type are handled for single primary #1175