Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

Cannot edit instance in Group

Maybe it’s a new feature of GCP, but it seems not possible to edit an instance inside a group anymore as suggested in the video (minute 7.24)

8 Answers

Hello, Stefano, and welcome to our forums! Thanks for reaching out.

I just tried doing this again, myself, and I am still able to edit the instances, so I’m trying to figure out what might be different for you.

One possibility is that the Google account that the console has somehow "latched onto" is different from the one that has access to the resources–that might make the console disable. To ensure that’s not happening, you can log into GCP in a brand new Incognito session. That’ll make sure that it only knows about the one Google account that you want to use.

Another thing you can do is to try to affect the instances via the command line, in Cloud Shell. If you go to Cloud Shell and run gcloud compute instances delete xyz123instance, does it work? (Prompt or flag for zone notwithstanding.) The managed instance group should bring the instance right back, shortly, and it may even have the same name–but the creationTimestamp visible in gcloud compute instances describe xyz123instance will have changed. And then if you run gcloud compute instances add-tags xyz123instance --tags=open-ssh-tag, (Thanks for the correction, Mathew!) does that add the network tag to the instance? I just tried these things and they worked for me.

Please let me know what you find, either way–whether this solves it or you’re still stuck!

Mattias

krishna.gadhiraju

Even for me the edit option was disabled, I had to do it from gcloud command. I am not sure if Google has changed recently.

Tim Ashby

I’m having the same problem. That option is disabled in the console. A mouse hover over states "Unable to edit instances that are managed by a group"

Mattias Andersson

I really appreciate all of you letting me know the details of what’s happening for you! Thank you, Stefano, Krishna, and Tim! When this happens for you (anyone, I mean!), does it succeed if you run, gcloud compute instances add-tags xyz123instance --tags=open-ssh-by-tag-fwr? It seems like that should still work, based on what Krishna said, above, but having multiple reports would help me a lot. Thanks!

Mathew Chaney

I was also prevented from editing the instance via the console, and the command Mattias listed also didn’t work, but only because the tag is incorrect. It should not be "open-ssh-by-tag-fwr" — this is the firewall rule name. It should instead be "open-ssh-tag", which is the target tag for that firewall rule.

Mattias Andersson

Thank you for the report and the correction, Mathew! Glad to hear that the command-line definitely can work around this block, for now. Fixed version: gcloud compute instances add-tags xyz123instance --tags=open-ssh-tag

cybergus

Hello ACGs, thanks for the command this is what worked for me: $gcloud compute instances add-tags frontend-ig-7xh6 –tags=open-ssh-tag-fwr

cybergus

Be careful that the fwr is shared in your tags or it will not work. Went back into firewall rule to edit because ip range was displaying 0.0.0.0/22, changed to /0…all good now.

Centurion

Thank you guys. I had to set the zone corresponding to my instance since that was not set in my configs. This worked from me gcloud compute instances add-tags YourInstanceName –tags=open-ssh-tag –zone=us-west1-a". If this executed successfully then refresh the gcloud ui and you should see you tags.

genesse

Yep, I had to do the same as Centurion…add the zone info. Otherwise it prompts you, but it prompted with the wrong zone, so best to just add it to the original command.

John Neff

I ran in to the same in error in the console. The gcloud command worked for me with the added "–zone=" parameter. As a note, at least for me, the tag did not seem to update right away. The command run successfully but the tag still wasn’t showing up. After about a minute it showed up.

Anil Pawar

Yes, its work for me with below syntax: gcloud compute instances add-tags –zone= –tags=open-ssh-tag

Imran

Hello, I had the same issue but this command worked for me gcloud compute instances add-tags xyz123instance –tags=open-ssh-tag …………………Thanks Imran

Yuvaraju Gaddam

I had this issue when working with console . This gcloud compute instances add-tags xyz123instance --tags=open-ssh-tagcommand worked well. Thanks mattias

Came against same issue as you guys, I didn’t know there was a discussion going on about this at first. Cheekily I removed the vm out of the group and edited the Tag. As it happens good old autoscaling was trying to add an instance into the group and everything went haywire. At the end I deleted the vm and let autoscaling add it. Finally resorted to follow your instructions on used gcloud and voila!!

I created a new using "Create similar" and added the tag there. This worked beautifully to illustrate the enabling of ssh. Editing of existing vm seems to be blocked/broken in the Console.

This shell command did work well and I greatly prefer that to the method I used, but just to post the alternate work around.  I duplicated the Instance Template using the COPY, added the tag to the new template and then updated the Instance Group by doing a ROLLING UPDATE selecting the alternate template to re-provision the VMs.

Mattias Andersson

Good for you, Mark! You learned more by doing it both ways. 👍

Steve Plowman

The shell command didn’t allow me to edit the VM instance. I followed the instructions be deleting it and applying the tag to it in the shell but when I go back to the console, EDIT is still disabled.

Steve Plowman

OK, NM. Your instructions aren’t to enable the edit, but to apply the label via shell.

I managed to get this working by deleting the VM through the console.  Once it regenerated, I was then able to Edit.  You could of course also do this through the CLI as described above.

hjl

Deleting and regenerating an instance does not work for me.

I was able to fix the issue with the line gcloud compute instances add-tags xyz123instance --tags=open-ssh-tag obviously just change "xyz123instance" for the name of your instance and it will work.

It is working fine if you use ZONE: 

gcloud compute instances add-tags xxxxinstancenamexxx–zone=us-west1-b –tags=open-ssh-tag

Does anyone find out the reason why we cant edit the instance directly from the instance group? yes, of course, the command line would work but wondering the reason why it cannot be done through console…

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?