I am not able to add network tag on 2nd VM which is in US-West1-A zone.
Error message: "You can not edit this VM instance because it is managed by a group. To edit this VM, first remove it from the instance group.
GCP does not allow you to add tag to instances in a managed group via Console anymore. But you can still do that via
gcloud command (from Cloud Shell or from your computer).
gcloud compute instances add-tags test-instance –tags=tag-1,tag-2
The above did not work, as it’s missing the region. This syntax worked gcloud compute instances add-tags [INSTANCE-NAME] –zone [ZONE] –tags [TAGS] Details here: https://cloud.google.com/vpc/docs/add-remove-network-tags#gcloud_2
This worked for me:
gcloud compute instances add-tags
The gcloud command works to add the tag. Using the instance name and zone example from the video that liked to this thread, the instructor would have needed to type the following command into his cloud shell.
gcloud compute instances add-tags frontend-ig-6hpf –zone us-west1-a –tags open-ssh-tag
So when you type it into your own cloud shell change "frontend-ig-6hpf’ to the name of your instance. And change "us-west1-a" to the zone your instance is in. for example my command looks like this
gcloud compute instances add-tags frontend-instance-group-wblv –zone us-west1-b –tags open-ssh-tag
I hope that clears up any confusion anyone might have. Let me know if you need more details. Sometimes the smallest of details can block a full understanding of a topic. I have been stuck on small details before and it can be terribly frustrating!