Can't pass user data to cloudinit

Running into an error passing user data into cloudinit.

Unhandled non-multipart (text/x-not-multipart) userdata

In /var/log/cloud-init-output.log
2019-07-03 16:12:01,821 -[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: ‘b’package_upgrade: true’…’

The Profile that I’m using

user.user-data: |
package_upgrade: true
packages: |
- tree
description: Default LXD profile
name: eth0
nictype: bridged
parent: lxdbr0
type: nic
path: /
pool: default
type: disk
name: default

  • /1.0/containers/doot

LXC/LXD version 3.0.3
Running on Ubuntu 18.04

Your metadata is invalid, it needs to start with a suitable header, in this case I think it is #cloud-config.

package_upgrade: true
 - tree

This worked like a charm. Not sure why I missed that, thank you.

Is there documentation on the valid metadata options ?

This covers the different formats that are supported, the most common is #cloud-config which is the usual yaml config

Nice, Thank you.