| Here are my notes about this: data_binding_terminus Calls to the hiera_xxx functions use the :hiera terminus Calls to the lookup function use the Puppet[:data_binding_terminus}. It can be set to hiera, none or the name of a custom terminus for Puppet::DataBinding models. The none terminus can be used to disable automatic parameter lookup. Setting it to a custom value will generate a deprecation warning (under control of strict). There are some examples of 3rd party data_binding_terminus, see https://tickets.puppetlabs.com/browse/PUP-6576?focusedCommentId=332145&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-332145. Based on https://tickets.puppetlabs.com/browse/PUP-6576?focusedCommentId=355340&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-355340 there is/was a desire to remove the data_binding_terminus setting so that there's just a single way of configuring lookups (using hiera.conf and different hiera5 backends). I think it would be ok to disallow setting data_binding_terminus to something other than none or hiera in Puppet 7, but will follow up on the mailing list. I don't think we want to remove the setting entirely due to wanting to disable APL (see PUP-7802). environment_data_provider The environment_data_provider setting is from hiera4 and provides a way of calling a per-environment data provider. Its value can be set to none, function or hiera in environment.conf. If it's set to function, then the environment needs to define a function in environments/<env>/lib/puppet/functions/environment/data.rb as: with a specific name and implement the data method:
Puppet::Functions.create_function(:'environment::data') do |
def data |
{ "key" => "value" } |
end |
end
|
See https://puppet-on-the-edge.blogspot.com/2015/01/puppet-40-data-in-modules-and.html for more context. If the environment_data_provider is set to function, puppet creates an EnvironmentDataProvider as it does for hiera, but its configuration is adapted to V4 so it knows to execute the environment::data function. It only makes sense to me to remove this setting at the same time we drop Hiera4 support. I'll also post to the mailing list. |