puppetlabs/puppet · error · ArgumentError
No title provided and %{type} is not a valid resource refere
Error message
No title provided and %{type} is not a valid resource reference What it means
Error "No title provided and %{type} is not a valid resource reference" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/resource.rb:597
# @api private
def self.type_and_title(type, title)
type, title = extract_type_and_title(type, title)
type = munge_type_name(type)
if type == TYPE_CLASS
title = title == '' ? :main : munge_type_name(title)
end
[type, title]
end
def self.extract_type_and_title(argtype, argtitle)
if (argtype.nil? || argtype == :component || argtype == :whit) &&
argtitle =~ /^([^\[\]]+)\[(.+)\]$/m then [::Regexp.last_match(1), ::Regexp.last_match(2)]
elsif argtitle.nil? && argtype.is_a?(String) &&
argtype =~ /^([^\[\]]+)\[(.+)\]$/m then [::Regexp.last_match(1), ::Regexp.last_match(2)]
elsif argtitle then [argtype, argtitle]
elsif argtype.is_a?(Puppet::Type) then [argtype.class.name, argtype.title]
else raise ArgumentError, _("No title provided and %{type} is not a valid resource reference") % { type: argtype.inspect } # rubocop:disable Lint/ElseLayout
end
end
private_class_method :extract_type_and_title
def self.munge_type_name(value)
return :main if value == :main
return TYPE_CLASS if value == '' || value.nil? || value.to_s.casecmp('component') == 0
Puppet::Pops::Types::TypeFormatter.singleton.capitalize_segments(value.to_s)
end
private_class_method :munge_type_name
private
# Produce a canonical method name.
def parameter_name(param)
param = param.to_s.downcase.to_sym
if param == :name and namevarView on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/resource.rb:597 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/881c21ac103149d8.
Report an issue: GitHub.