We document get_resources(localhost, Package) as an example of how to use get_resources and the function itself is defined to accept Resource objects in addition to strings. However Resource Types are not loaded during a plan so unless you quote the resource name and pass it as a string the plan will error.
"Evaluation Error: Resource type not found: Package[...]
We document {{get_resources(localhost, Package)}} as an example of how to use get_resources and the function itself is defined to accept Resource objects in addition to strings. However Resource Types are not loaded during a plan so unless you quote the resource name and pass it as a string the plan will error.
{{"Evaluation Error: Resource type not found: Package[...]}}
Users should be able to use core types like {{Package}} and {{File}} or any custom types available on the module path with {{get_resources}} which may change how these objects behave more generally in the plan language.
If the concept of "resources" should exist while compiling in "script"/bolt mode then resource types should really also work, or it starts to be confusing. I can imagine that it starts to get tricky though since some operations on resources require that there is a Catalog - and there isn't one in "script mode".
Henrik Lindberg I agree we'll need to load the resource types. I'm not exactly sure what you mean by the "work" though. One of our longer term goals is to make bolt more resource aware. During a plan you should be able to discover resources and track changes made to those resources. The get_resources function is the first step towards this.