you can. you can also get a resource identifier as string like
"template[/foo/bar]", and construct the resource back in your provider,
chef has helper for all this. but in chef resources are generally
decoupled, and communication are done as notifications. this also
decouples what & when to do when a notification is receive. you'll
complicate all those things, as the order of the consumed resource etc will
matter.
why not hide the other resource as a sub resource ? i.e. construct
BinaryServer inside AdminServer, then AdminServer can expose a
binary_server attribute to customize the underlying BinaryServer , but its
opaque to the consumer.
you can do this pretty easily, i think kind_of just takes a class name as
an argument, so you could just say :kind_of => Chef::Resource::BinaryServer. I do something very similar in the
haproxy-ng cookbook, but via callbacks, as the attribute takes multiples: