https://puppet.com/docs/puppet/4.10/whered_it_go.html#new-codedir-holds-all-modulesmanifestsdata lists the hiera.yaml in the $codedir.
https://puppet.com/docs/puppet/4.10/hiera_config_yaml_5.html#location-of-hierayaml lists the hiera.yaml in the $confdir.
This to pages disagree on where the global hiera.yaml should be. I tested both and both worked. Is one of the 2 locations backword compatibility?
Documentations should be clarified and unified so they don't disagree anymore.