This probably won't do what you want in all cases as it will probably be
manifest parse order dependent.

See my post on types and providers at https://www.onyxpoint.com/?p=202 for
processing order details based on observation.

Thanks,

Trevor


On Wed, Aug 21, 2013 at 4:55 AM, Dominic Cleal <dcl...@redhat.com> wrote:

> Hi all,
>
> A bit of an open-ended question, but has anybody designed custom types
> with parameters that reference other resources?  Are there any 'gotchas'
> to be aware of, or functionality that this can break?
>
> The types in this case are for SSL certificate handling and the thought
> is to have a type representing a CA and resources for certificates
> signed by that CA.  Instead of duplicating the parameters and data for
> the CA on the certificate resources, you'd reference the CA resource
> itself.  For example:
>
>   ca { 'my-ca':
>     ensure      => present,
>     common_name => $fqdn,
>     country     => $certs::ca_country,
>     state       => $certs::ca_state,
>     city        => $certs::ca_sity,
>     org         => $certs::ca_org,
>     org_unit    => $certs::ca_org_unit
>   }
>
>   cert { 'qpid-broker':
>     ensure => present,
>     ca     => Ca['my-ca']
>   }
>
> The 'cert' type could retrieve any data it needed from the Ca[my-ca]
> resource.
>
> Of course, the relationship metaparameters do reference individual or
> arrays of other resources in the catalog, and a quick test of this
> appears successful.
>
> Is this supported for ordinary, non-metaparameters and could it cause
> any problems?  I'm thinking of layered projects such as PuppetDB, if it
> would be able to import catalogs containing these references.
>
> Thanks,
>
> --
> Dominic Cleal
> Red Hat Engineering
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-dev+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-dev@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-dev.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaug...@onyxpoint.com

-- This account not approved for unencrypted proprietary information --

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to