adds a resource on promises