Rpm installation using chef

Hi All,
i have query around using rpm_package resource using chef.
we run chef client using user called “chef” which has sudo permission to install rpm package e.g 'sudo rpm -ivh ’

i know it can be used in execute or bash resource and called above rpm install command. but i want to make use of rpm_package resource install instead of execute resource.

is there any way to achieve that. the other option is to elevate the the chef user permission like root which is restricted at the moment.

chef was mainly designed to be run with root privileges… lot of resources rely on that. Can you give sudo permission for your chef user to run chef-client?

Thanks simark, it worked, running sudo chef-client with chef user.