Using environment variables on kapacitor with multiple influxdb hosts: kapacitor_influxdb_1_urls_0

I am trying to use environment variables for kapacitor as described:

root@8473620:/usr/src/app# printenv | grep KAPACITOR
KAPACITOR_INFLUXDB_1_USERNAME=myusername
KAPACITOR_INFLUXDB_1_PASSWORD=mysecretpassword
KAPACITOR_INFLUXDB_1_URLS_0=https://lonepine-dc17c6fc.influxcloud.net:8086

relevant kapacitor.conf lines

I have removed the values for

urls, username and password on the second entry as I’m assuming that’s inserted by the environment variables

...
[[influxdb]]
  enabled = true
  default = true
  name = "localInflux"
  urls = ["http://localhost:8086"]
  username = ""
  password = ""
  ssl-ca = ""
  ssl-cert = ""
  ssl-key = ""
  insecure-skip-verify = false
  timeout = "0s"
  disable-subscriptions = true
  subscription-protocol = "http"
  kapacitor-hostname = ""
  http-port = 0
  udp-bind = ""
  udp-buffer = 1000
  udp-read-buffer = 0
  startup-timeout = "5m0s"
  subscriptions-sync-interval = "1m0s"
  [influxdb.subscriptions]
  [influxdb.excluded-subscriptions]
    _kapacitor = ["autogen"]

[[influxdb]]
  enabled = true
  default = false
  name = "cloudInflux"
  timeout = 0
  insecure-skip-verify = false
  startup-timeout = "5m"
  disable-subscriptions = true
  subscription-protocol = "http"
  subscriptions-sync-interval = "1m0s"
  kapacitor-hostname = ""
  http-port = 0
  udp-bind = ""
  udp-buffer = 1000
  udp-read-buffer = 0
  [influxdb.subscriptions]
  [influxdb.excluded-subscriptions]
....

error:

ts=2018-09-27T19:53:17.110Z lvl=error msg="encountered error" service=run err="create server: invalid configuration: must specify at least one InfluxDB URL. To generate a valid configuration file run `kapacitord config > kapacitor.generated.conf`."

Any help on what I’m missing would be much appreciated!