If I understand your question right You have ssh_authorized_keys where you put ssh keys for each user https://cloudinit.readthedocs.io/en/stable/reference/modules.html#users-and-groups And about UID users has field 'uid' that you can set (more in this doc above)
About second question it's up to you :) in my terraform I have cloudinit template where I pass hostname, apt packages and additional commands after setup as terraform templatefile
If I understand your question right You have ssh_authorized_keys where you put ssh keys for each user https://cloudinit.readthedocs.io/en/stable/reference/modules.html#users-and-groups And about UID users has field 'uid' that you can set (more in this doc above)
About second question it's up to you :) in my terraform I have cloudinit template where I pass hostname, apt packages and additional commands after setup as terraform templatefile