How can I change the resource type after resource assigning