Issue #19474 has been updated by Andrew Parker.
Relating this to #21409 since I think the root of both of them is that `create_resources` instantiates resources quite differently from the language. ---------------------------------------- Bug #19474: Using create_resource or some other Ruby methodology for creating resources allows for invalid resource references https://projects.puppetlabs.com/issues/19474#change-94660 * Author: Ken Barber * Status: Unreviewed * Priority: Normal * Assignee: * Category: * Target version: * Affected Puppet version: 3.1.0 * Keywords: * Branch: ---------------------------------------- See #17842 for an example of this: <http://projects.puppetlabs.com/issues/17842#note-5> The problem is that this is invalid in the parser: file { '/tmp/foo': ensure => present, require => [ Mymodule::foo['bar'] ], } But this works successfully: create_resources('file', { '/usr/local/homeaway/api-favorites-ustst1-jdk/java' => { ensure => present, require => "Mymodule::foo[bar]" }}) However, in PuppetDB we are more strict and the second case fails with an invalid relationship error - we can fix the error message on our end, but this still shouldn't be allowed I believe. The question is - should this be fixed in the internals so people tapping resource creation (like within create_resources) get an error or something else? Or perhaps fixed in create_resources? Its basically just an inconsistency between that methodology and what the parser enforces. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
