puppetlabs/puppet · error · ArgumentError
Unknown resource type: '%{type}'
Error message
Unknown resource type: '%{type}' What it means
Error "Unknown resource type: '%{type}'" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/pops/evaluator/runtime3_resource_support.rb:31
if type_name.is_a?(String) && type_name.casecmp(CLASS_STRING) == 0
# Resolve a 'class' and its titles
resource_titles = resource_titles.collect do |a_title|
hostclass = env.known_resource_types.find_hostclass(a_title)
hostclass ? hostclass.name : a_title
end
# resolved type is just the string CLASS
resolved_type = CLASS_STRING
else
# resolve a resource type - pcore based, ruby impl or user defined
resolved_type = find_resource_type(scope, type_name)
end
# TODO: Unknown resource causes creation of Resource to fail with ArgumentError, should give
# a proper Issue. Now the result is "Error while evaluating a Resource Statement" with the message
# from the raised exception. (It may be good enough).
unless resolved_type
# TODO: do this the right way
raise ArgumentError, _("Unknown resource type: '%{type}'") % { type: type_name }
end
# Build a resource for each title - use the resolved *type* as opposed to a reference
# as this makes the created resource retain the type instance.
#
resource_titles.map do |resource_title|
resource = Puppet::Parser::Resource.new(
resolved_type, resource_title,
:parameters => evaluated_parameters,
:file => file,
:line => line,
:kind => Puppet::Resource.to_kind(resolved_type),
:exported => exported,
:virtual => virtual,
# WTF is this? Which source is this? The file? The name of the context ?
:source => scope.source,
:scope => scope,
:strict => trueView on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/pops/evaluator/runtime3_resource_support.rb:31 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/1fc3bdcc411a7cbc.
Report an issue: GitHub.