Remediation
From Google Cloud Consoleβ
- Go to the
VM instances
page by visiting: https://console.cloud.google.com/compute/instances. - Click on the instance name to go to its
VM instance details
page. - Click
STOP
and then clickEDIT
. - Under the section
API and identity management
, select a service account other than the default Compute Engine service account. You may first need to create a new service account. - Click
Save
and then clickSTART
.
From Google Cloud CLIβ
-
Stop the instance:
gcloud compute instances stop <INSTANCE_NAME>
-
Update the instance:
gcloud compute instances set-service-account <INSTANCE_NAME> --service-account=<SERVICE_ACCOUNT>
-
Restart the instance:
gcloud compute instances start <INSTANCE_NAME>