Remediation
From Google Cloud Console
- Go to the
VM instancespage by visiting: https://console.cloud.google.com/compute/instances. - Click on the instance name to go to its
VM instance detailspage. - Click
STOPand 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
Saveand 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>