Resources

Resources are programmatic building blocks in Chef; they are a declarative mechanism to manipulate a resource on a host. Resources deliberately hide the underlying implementation that is left to a provider. It is important to recognize that a resource describes what is being manipulated, not how it is being manipulated; this is by design, as it provides a high level of abstraction for Chef recipes to be as platform-neutral as possible.

For example, Chef has built-in resources that include the following:

  • Cron jobs
  • Deployments
  • File system components (mount points, files and directories, and so on)
  • Source code repositories (Git and svn)
  • Logs
  • PowerShell scripts (Windows targets)
  • Shell scripts
  • Templates
  • Packages
  • Users and groups

Resources combined with ...

Get Chef: Powerful Infrastructure Automation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.