0

I am trying to template an ini-file with jsonnet/tanka. Problem is that the file has to contain multiple duplicate sections. (Yes, I know this is probably not the best design, but out of my hands). Specifically i am trying to dynamically generate something like this:

# InfluxDB Backend InfluxDB01
[[influxdb]]
  name = "influxdb01"
  location = "http://127.0.0.1:8086/"
  timeout = "10s"

# InfluxDB Backend InfluxDB02
[[influxdb]]
  name = "influxdb02"
  location = "http://127.0.0.1:8087/"
  timeout = "10s"

by looping over an array of influx-databases:

{
instances: [
  {
    id: 'test01',
    addres: 'test01',
  },
  {
    id: 'test02',
    addres: 'test02',
  },
]
}


std.manifestIni throws me an error about duplicate keys.

Any help appreciated.

strowi
  • 27
  • 3

0 Answers0