Resource types
Resource types are a special family of data
types that behave differently from other data types. They are subtypes of the fairly
abstract Resource
data
type. Resource references are a useful subset of this data type family.
In the Puppet language, there are never any values whose data
type is one of these resource types. That is, you can never create an expression
where $my_value =~
Resource
evaluates to true
. For example, a resource declaration — an expression
whose value you might expect would be a resource — executes a side effect and then produces
a resource
reference as its value. A resource reference is a data type in this family of
data types, rather than a value that has one of these data types.
In almost all situations, if one of these resource type data types is involved, it makes more sense to treat it as a special language keyword than to treat it as part of a hierarchy of data types. It does have a place in that hierarchy; it’s just complicated, and you don’t need to know it to do things in the Puppet language.
For that reason, the information on this page is provided for the sake of technical completeness, but learning it isn't critical to your ability to use Puppet successfully.