# @summary A worker (public) key for a given cluster. # # This resource is supposed to be created and exported by the worker # resource, and then collected by the web resource. # # It should however be fine to create manual instances of this resource. # # @param content # Complete content of the key, as it appears on disk. # Mutually exclusive with source. # @param source # Place where the complete contents of the key can be found. # Mutually exclusive with content. # @param cluster # Which cluster this key is part of. # @api private define concourse::worker_key ( String $cluster, Optional[String] $content = undef, Optional[Stdlib::Absolutepath] $source = undef, ) { if $content and $source { fail('Content and source are mutually exclusive') } concat::fragment { $name: content => $content, source => $source, target => "authorized_worker_keys - ${cluster}", } }