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.

Reply via email to