Chef resource

It is a fundamental block you work with. A Chef resource is essentially a some system component that we'd like to take action on. We'd like to take this resource and change its state on the system. Examples: files. packages, services - system components that needed to be modified using Chef.
Resource describes the desired state of an element of your infrastructure and the steps needed to bring that item to a desired state.

Example 1:

package 'nginx' do
  action :install
end
Example 2:
service 'ntp' do
  action [:enable, :start]
end
Example 3:
file '/etc/motd' do
  content 'This is a private system'
end
If no action is listed, the default action is applied.