cloud-init-default-user

Sets the name of the cloud-init default user, i.e. the user that SSH keys from the instance metadata are injected into, and configures cloud-init to grant it passwordless sudo.

Only the name and sudo rule of the user are changed; the other default_user settings (groups, shell, etc.) are inherited from the distribution’s /etc/cloud/cloud.cfg. As the sudo rule is applied by cloud-init on boot, it can be overridden with user-data. cloud-init must already be installed in the image.

Including this element without setting DIB_CLOUD_INIT_DEFAULT_USER will cause image builds to fail.

Environment Variables

DIB_CLOUD_INIT_DEFAULT_USER
Required:

Yes

Default:

None

Description:

Name of the cloud-init default user. Must start with a lowercase letter or underscore, followed by lowercase letters, digits, underscores or hyphens.

Example:

DIB_CLOUD_INIT_DEFAULT_USER=rocky