You need to provision a Compute Engine virtual machine that requires access to Cloud Storage, following Google Cloud identity best practices. Arrange the administrative steps in the correct logical sequence to create, grant permissions to, and assign a custom service account to the instance.
- 1Create a new custom service account using the gcloud iam service-accounts create command.
- 2Grant the required IAM roles (e.g., roles/storage.objectViewer) to the service account at the project level.
- 3Grant the deployment user the Service Account User role (roles/iam.serviceAccountUser) on the service account.
- 4Create the Compute Engine instance specifying the --service-account flag with the service account email address.
Cevap
The correct order is: 1) Create the dedicated service account, 2) Grant the required resource IAM roles to the service account, 3) Grant the deployment identity the Service Account User role, 4) Create the Compute Engine instance with the service account attached.
The correct workflow begins by creating the service account identity, defining its resource access permissions next, delegating usage rights to the deployer third, and attaching the service account to the VM instance during creation fourth.
Adım Adım Çözüm
Anahtar Kavram
Sequential lifecycle of creating, granting permissions to, delegating use of, and attaching service accounts in Google Cloud.