'Return the Resource objects in given stack on which this depends.'

def dependencies(self, stack):

    def get_resource(res_name):
        if (res_name not in stack):
            if (res_name in stack.t.get(stack.t.RESOURCES)):
                return
            raise exception.InvalidTemplateReference(resource=res_name, key=self.name)
        res = stack[res_name]
        if getattr(res, 'strict_dependency', True):
            return res
    return six.moves.filter(None, six.moves.map(get_resource, self.required_resource_names()))
