Sorry for my mistake. The "add-user" should be a subkey of "manual".
And You are right! cloud-init does something to impact "add-user" function, even if we only use network-config or meta-data, not user-data.
If we fully remove cloud-init from YAML, the "add-user" function can correctly add a "ubuntu" user for logging.
If we use some cloud-init configs, the "add-user" function works for other usernames (except "ubuntu").
Therefore, we confirmed the "add-user" function is working as expected. Thanks for your effort.
Hey Paul,
Sorry for my mistake. The "add-user" should be a subkey of "manual".
And You are right! cloud-init does something to impact "add-user" function, even if we only use network-config or meta-data, not user-data.
If we fully remove cloud-init from YAML, the "add-user" function can correctly add a "ubuntu" user for logging.
If we use some cloud-init configs, the "add-user" function works for other usernames (except "ubuntu").
Therefore, we confirmed the "add-user" function is working as expected. Thanks for your effort.