Hi,
please note that
create_resources('iis::manage_site', hiera_hash('iis::sites', []))
is not the most atomic way of looking up hiera data at all. You could do
the same thing like this:
$sites = hiera('iis::sites', {})
create_resources('iis::manage_site', $sites)
This gives you the advantage of being able to just work with the $sites
hash as well.
$addr_web1 = $sites['myweb1']['ip_address']
Further notes:
1. Don't pass [] as the default value for a hash lookup. Use {}.
2. Use hiera_hash() only if you need to merge hash data from all
hierarchy layers.
HTH,
Felix