For cloud-init with UC20, you have the following options:
- Put it in the root of your gadget snap as cloud.conf
- Put it in the ubuntu-seed partition at
<ubuntu-seed>/data/etc/cloud/cloud.cfg.d/
with filenames ending with.cfg
- Provide through external filesystems that cloud-init will by default searches, for example the NoCloud datasource will search for drives labeled CIDATA with files in the root labeled
meta-data
anduser-data
- Put it in ubuntu-seed, and let snapd filter out unsafe configuration from the config so only certain keys are allowed
Option 1 is always allowed with UC20, regardless of model assertion grade. Option 2 is only allowed with model assertion grade dangerous Option 3 is allowed only with model assertion grade dangerous and signed (so this does not work for secured). Option 4 is currently being worked on and will be allowed for model assertions grade signed and dangerous.
Here’s a table of allowed cloud-init methods vs the model assertion grade
Method | Dangerous | Signed | Secured |
---|---|---|---|
Ubuntu-seed | |||
NoCloud CIDATA | |||
Gadget cloud.conf | |||
Ubuntu-seed filtered |