voxpupuli / hiera-eyaml

A backend for Hiera that provides per-value asymmetric encryption of sensitive data
MIT License
527 stars 132 forks source link

Allow Hash keys as Array #337

Open tuxmea opened 1 year ago

tuxmea commented 1 year ago

I want to set a hash key to an array:

stdlib::manage::create_resources:
  package:
    ['htop', 'strace', 'less']:
      ensure: installed

EYaml produces the following error:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Value for key 'stdlib::manage::create_resources', returned from lookup_key function 'eyaml_lookup_key', when using location '/etc/puppetlabs/code/environments/production/data/common.yaml', has wrong type, expects Puppet::LookupValue, got Hash[String, Hash[Array[Enum['htop', 'less', 'strace'], 3, 3], Hash[String, String, 1, 1], 1, 1], 1, 1] on node puppet5.ma.betadots.training
kenyon commented 1 year ago

I wonder if this error is even coming from hiera-eyaml.

tuxmea commented 1 year ago

@kenyon I suppose that this comes from hiera. See https://tickets.puppetlabs.com/browse/HI-637