shouldn't we signal an error if this is a dict without 'resource'?