Skip to content

Allow explicit type selection in hiera values #11

@oxc

Description

@oxc

Allow specifying an explicit type instead of auto when specifying keys in hiera, e.g.

domain:
  example.com:
    path: /var/lib/rspamd/dkim/$domain.$selector.key
    'selector: string': 20200822

When this is possible, allow arrays to be printed as config-arrays:

    rates:
      some_limit:
        selector: 'user.lower'
        'bucket: array':
          - burst: 100
            rate: "10 / 1min"
          - burst: 10
            rate: "100 / 1min"

this should result in:

rates {
  some_limit {
    selector = "user.lower";
    bucket = [
    {
      burst = 100;
      rate = "10 / 1min";
    },
    {
      burst = 10;
      rate = "100 / 1min";
    }
    ]
  }
}

The exact syntax has still TBD, but I believe key: type should have the least potential for clashing with future keys/features, while being a common way to specify types in many langauges.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions