1 Answers
GCP account is purely a Google account using on GCP services, so yes it’s a Gmail address too.
A GCP account is totally different from a GCE VM account (or it should be called an OS account to be exact). GCP account is for you to use GCP services, while OS account is for you to log in to the OS environment inside the VM.
Unlike other platform where you will normally define a username (and password) at the creation of VM, when a new GCE instance is created it doesn’t have any OS account within.
The only exception is that if your GCP project (where GCE instance belongs to) have project-wide SSH keys and your new instance is Linux-based, all project-wide SSH keys (with corresponding username inside the key) will be populated to your instances. You can prevent this auto-population by toggling the "prevent project-wide SSH keys" during the instance creation.
Assuming that the instance is Linux-based, after the creation you can either connect to that instance by clicking the [SSH] button or using gcloud
command via Cloud Shell. When doing that, the Service Account for Compute Engine will create OS account (or Linux user to be exact) and put it to your instance.
Of course you can pre-create the account you want with several ways:
Use the startup script section to create user
Put your own SSH key (public key only) into instance’s metadata. The public key will also contain the username that you want it to be. You have to create an SSH keypair on your own. If using this method, you would want to disable the project-wide SSH keys feature.
Create your own VM image with pre-created username.
Hope that can answer your concerns 🙂
Thanks Tuan,