jbelien/OVH-Cloud-Snapshot

problem with yaml file "You cannot define a mapping item when in a sequence at line 2 (near "instances:")"

deconya opened this issue · 3 comments

Hi
Im checking to use it but I receive this problem

My yaml file

---
applicationKey: ###
applicationSecret: ###
consumerKey: ###

duration: P6M

projects:
 - id: 714fe7e69e9e467caa427feeac46aa4e
 instances:
  - &corp
  id: d3d29ffd-b2f7-4bf7-9c86-25035070c558
  name: Corp
...

Where can be the problem?

Hello @deconya ,

First of all, don't publish publicly your applicationSecret ! That's supposed to be secret !
I removed it from your issue but I suggest you to create a new one, just to be safe !

And about your issue, in YAML the indentation is really important !
Your file is not indented correctly. You can check this by using a validating tool like http://www.yamllint.com/

Here is the correctly indented version :

---
applicationKey: ...
applicationSecret: ...
consumerKey: ...

duration: P6M

projects: 
  - id: 714fe7e69e9e467caa427feeac46aa4e
    instances: 
      - &corp
        id: d3d29ffd-b2f7-4bf7-9c86-25035070c558
        name: Corp

Thanks for the link I will check and see. Don't worry for application key, it was made by a generator with same format, so all details are false. I will check and confirm If this is the problem

Hello @deconya , is this issue fixed ?