ensoure_resource didnt work as expected, defined does the job