I'm trying to remove two tags "green" and "yellow" from the latest revision "editor-v2-0-0" on Cloud Run:
But when I ran the command with a list of two values "green" and "yellow" as shown below to remove two tags "green" and "yellow" from the latest revision "editor-v2-0-0":
gcloud run services update-traffic editor /
--remove-tags=[green,yellow]
// A list of 2 values
These two tags were not removed:
Even though the documentation says as shown below:
--remove-tags=[
TAG
,…]List of tags to be removed.
But when I ran the command with one value "green" as shown below to remove one tag "green" from the latest revision "editor-v2-0-0":
gcloud run services update-traffic editor \
--remove-tags=green
// One value
I could remove one tag "green":
So, is it possible to remove two tags "green" and "yellow" from the latest revision "editor-v2-0-0" with the command which has a list of two values "green" and "yellow"? If possible, how can I do this?
Run the command without using square brackets "[]" as shown below:
gcloud run services update-traffic editor \
--remove-tags=green,yellow
// "[]" are removed
Then, two tags "green" and "yellow" are removed from the latest revision "editor-v2-0-0":
In addition, if there are one or more empty strings before or after a comma in a list, there is an error.
So, if an empty string is before a comma:
gcloud run services update-traffic editor \
--remove-tags=green ,yellow
// An empty string before a comma
Then, there is an error:
ERROR: (gcloud.run.services.update-traffic) unrecognized arguments: ,yellow
And if an empty string is after a comma:
gcloud run services update-traffic editor
--remove-tags=green, yellow
// An empty string after a comma
Then, there is an error:
ERROR: (gcloud.run.services.update-traffic) unrecognized arguments: yellow
So, don't put one or more empty strings before or after a comma in a list:
gcloud run services update-traffic editor \
--remove-tags=green,yellow
// No empty strings
// before or after a comma
In addition again, you can remove "=" just right to "--remove-tags" but it still works:
gcloud run services update-traffic editor \
--remove-tags green,yellow
// "=" is removed
// but it still works