The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Feature #15081

Add support for virtual and exported resources to create_resources

Added by Gary Richards almost 4 years ago. Updated almost 3 years ago.

Status:ClosedStart date:06/18/2012
Priority:NormalDue date:
Assignee:-% Done:


Target version:3.1.0
Affected Puppet version: Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:



I use create_resources quite a bit and have found that it would often be useful for the resources that it creates to be either virtual or exported.

In my own limited way I took a copy of create_resources.rb and it seems to be as simple as setting p_resource.exported or p_resource.virtual to true just after p_resource gets set to the new resource, but i’m sure there’s loads that I don’t understand about all this code!



#1 Updated by James Turnbull over 3 years ago

  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Dan Bode

Dan – no action required but thought your input would be interesting. Any thoughts on the ticket?

#2 Updated by Dan Bode over 3 years ago

I am pretty sure it would be that simple.

I can’t imagine any unexpected consequences.

Seems pretty reasonable to me.

#3 Updated by Erik Dalén over 3 years ago

I’d be happy to get this feature in there. I think just adding @ or @@ to the type name should be a good way of doing it.

#4 Updated by konrad rzentarzewski over 3 years ago

i’m quite suprised it doesn’t work.

<4>root@punch(2)~$ puppet apply /tmp/ttt.pp 
could not create resource of unknown type @xx at /tmp/ttt.pp:5 on node
<4>root@punch(3)~$ cat /tmp/ttt.pp
define xx ($xox=$title) {
notify { "$title | $xox": }
<4>root@punch(4)~$ cat hiera/common/common.yaml 
# defaults
  xox: one
  xox: two
  xox: tri

any good reason why i can’t migrate my user database from manifests to hiera?

#5 Updated by konrad rzentarzewski over 3 years ago

the following should fix the problem:

please integrate into telly.

#6 Updated by Erik Dalén over 3 years ago

  • Branch set to

Opened a pull request with a fix for this and tests.

#7 Updated by konrad rzentarzewski over 3 years ago

i’m using it on production (patched 2.7.18) for a week now, with no issues. just letting you know.

#8 Updated by Anonymous over 3 years ago

  • Category set to functions
  • Status changed from Needs Decision to Accepted
  • Assignee changed from Dan Bode to Anonymous
  • Target version set to 3.x
  • Keywords set to create_resources

I’ve committed to working on this by the c.o.b. Friday, 10/26.

We’re planning to get this into the next minor release of Puppet, which is 3.1.0 at the time of this update.


#9 Updated by Anonymous over 3 years ago

  • Status changed from Accepted to Merged - Pending Release
  • Assignee deleted (Anonymous)
  • Target version changed from 3.x to 3.1.0

Merged into master

As: 7af8c6e

Documentation update in 7174058

$ git branch —contains 7af8c6e dalen-create_resources-virtexport * master

#10 Updated by Matthaus Owens over 3 years ago

  • Status changed from Merged - Pending Release to Closed

Released in Puppet 3.1.0-rc1

Also available in: Atom PDF