add_resource_meta function