I’m trying to launch a container using multiple LXD profiles, where each profile contains a different cloud-config section.
When I do this, it seems that only the cloud-config data from the last profile applied takes effect. Is there a way to merge the cloud-init configurations from all profiles so they can be applied simultaneously at launch?
Unfortunately not. Since each cloud init configuration is stored in a single key, each successive profile overrides the entire contents of that config key (and finally any configuration on the instance will override inherited profile configurations).
Good to know about this SSH key way of doing. This is actually solving one of my profile which was dedicated to ssh.
Another profile is about GPG public keys import (and other setup to enable GPG tunnel signing through ssh). I imagine this doesn’t drift away much from SSH key import and it would be great to have it as a new feature. I will open a feature request once everything is more clear for me.