I think the primary issue is that cloud-init.service is depending on using the network fully.
cloud-init.service runs:
After=networking.service
After=systemd-networkd-wait-online.service
Before=network-online.target
But systemd-resolved.service runs
After=systemd-networkd.service network.target
Before=network-online.target nss-lookup.target
I tried adding to cloud-init.service.
After=systemd-resolved.service
but that did not help things.
I think the primary issue is that cloud-init.service is depending on using the network fully. networking. service systemd- networkd- wait-online. service network- online. target
cloud-init.service runs:
After=
After=
Before=
But systemd- resolved. service runs systemd- networkd. service network.target network- online. target nss-lookup.target
After=
Before=
I tried adding to cloud-init.service. systemd- resolved. service
After=
but that did not help things.