DSL entity for an inherited_place declaration inside places do on an Instance resource.
Generates an Ash calculation of the same name as role that walks the instance graph to
inherit a place from a reached instance. The calculation is injected by
TransformInheritedRefs at compile time — no PlaceRef edge is created on the consuming
instance itself.
Fields
role— atom; the name of the generated calculation (and the place slot name from the consumer's perspective — the surfacedPlaceRefcarries this role).source_role— atom; thePlaceRefrole to read on each reached instance (e.g.:location). Required. This terminal deref is not avia:hop —via:reaches the instance; routing through a place (the ref graph) is calc territory (see #227).via— the hop chain to the instance holding the ref, in the unified #213 grammar (shared withinherited_characteristic): a bare atom is{:reverse, assignment: alias}shorthand; tuples are{:forward | :reverse, assignment: alias}or{:forward | :reverse, relationship: type | [type: t, alias: a]}. Whennil, defaults to[role]. SeeDiffo.Provider.Extension.Traversal.collapse—:firstor:last; collapses the consumer-ordered result list (the refs atsource_roleacross reached instances) to that end. When set, the calc returns a single place ornilrather than a list.
Example
places do
inherited_place :installation_site, source_role: :location
inherited_place :exchange, via: [:primary, :uplink], source_role: :location
# forward relationship hop + collapse to the single reached place
inherited_place :poi,
via: [{:forward, relationship: [alias: :circuit]}, {:reverse, assignment: :cvlan}],
source_role: :locates,
collapse: :first
end