Search code examples
puppet

puppet: `puppet resource <defined_type>` does not show defined type


I created a test.pp file and put in it a defined type that basically creates a file at /tmp/asdf. I ran puppet apply test.pp and verified that the file got created. However, when I go to puppet resource -t, I don't see that type listed, and I also don't see it when I try:

puppet resource hello_define
Error: Could not run: Could not find type hello_define

I loosely followed this guide:

https://soivi.net/2013/define-types-example-in-puppet/


Solution

  • The puppet resource tool doesn't work with defined types, but only built-in types and custom (Ruby) types that have a properly implemented self.instances method. Have a look at this thread for instance: ref. HTH.