1

I get this error when I run the command:

$ bosh int config.yml --path /applications/routes/route

Expected to find a map at path '/applications/routes' but found '[]interface {}'

Exit code 1

This is my config.yml file:

applications:
- buildpack: php_buildpack
  instances: 1
  memory: 1G
  name: yxyxy
  routes:
    route: preprod-paas.itn.group
  services:
  - maria-db
  - smtp-mail

Any help, I'm using bosh CLI V2?

Rowan Jacobs
  • 389
  • 4
  • 13
Melchia
  • 22,578
  • 22
  • 103
  • 117

1 Answers1

1

Your YAML structure includes array with single item. You need to find an element with this array. I usually search by name. In your case, it will look like: bosh int --path /applications/name=yxyxy/routes/route.

I think it is also possible to get item by index /applications/0/routes/route

There is a syntax documentation, that you can check https://github.com/cppforlife/go-patch/blob/master/docs/examples.md

Oleksandr Slynko
  • 787
  • 6
  • 11
  • Thank you, both are working. Is there no official documentation to bosh cli other than this github repo? – Melchia May 31 '18 at 09:03
  • 1
    Yes, there is official bosh-cli documentation http://bosh.io/docs/cli-ops-files/. It is a bit more focused on deployment and operations. – Oleksandr Slynko May 31 '18 at 11:29