[COOK-3343] Fix the nil class exception for deploy_resource