I want to iterate over all instances of defined types (ex. Apache::Vhost). However this loop only list my resources under the scope.
<% scope.catalog.vertices.each do |resource| -%>
<%# if resource.type == "Apache::Vhost" -%>
#Include <%= resource.title %>
<% end -%>
Walking the catalog durig at compile time ("catalog building") is a Bad Idea.
If you really want this functionality, think about moving the iteration code to a custom provider that will generate the file content akin to what your master side template tries at the moment.
At the sync stage, you can safely access the complete catalog via self.resource.catalog
.