I’m trying to understand the cloud-init portion through lxd for vm’s. I’m trying to push a static ip via cloud-init to a 20.04 vm. It doesn’t seem to run at all if I use user.network-config portion. It seems like I’m missing a step or maybe not grabbing the concept. I was able to get a a static ip via using write_files: in user.user-data: and adding a static stuff there and restarting netapply. That feels a little hacky and not sure if that is the right way.
Until some fixes happen to the main Ubuntu images, your best change is to use images:ubuntu/20.04/cloud which is an image with a properly enabled agent that does not need the cloud-init:config device you have in your config.
That VM image will run cloud-init with data inserted through the agent which then does support network-config properly.