moved hiera data creation as it should only be called once.