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?
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