Nope, the cloud-init does not allow to configure the network at that stage. As I suggested in the post you linked, the workaround is to write a bash script to write the netplan config and run netplan apply
Hmm that’s less than ideal in my opinion. The inability to define the networking part of the infrastructure in the code seems like an oversight. But manually configuring the networking does work. Is there an option somewhere to make DHCP the default?
as mentioned in my first reply, you can edit the machine’s interfaces and configure the IP mode from AUTO to DHCP. That way, the interfaces of your machine will be configured to use DHCP and there is no need to use a custom cloud-init script