So I believe i'm doing something wrong as it should be very simple.
Can you help me please?
--
© 2014 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/a51e7e8c-b707-488c-818b-4d9fa24fbcab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello Rodrigo,--metadata is an ArgDict argument, which means it expects an argument of the form '--metadata key1=value1,key2=value2'.To get around this, you can specify an alternate delimiter (as opposed to a comma) using the following syntax: '^FOO^key1=value1FOOkey2=value2'In your case the following command should work:$ gcloud compute instances create inst2 --metadata ^:^key1=value:key2=myValue:key3=valueIndex1,valueIndex2,valueIndex3
Please make sure that you're using the latest version of the Cloud SDK. To update your Cloud SDK use the command below:$ gcloud components updateSincerely,Kamran
On Tuesday, July 7, 2015 at 10:10:15 AM UTC-4, Rodrigo Borges wrote:
Hello,whats is the best way to use a instance metadata value as a list using commas?I think i can't understand this document as i should: https://cloud.google.com/sdk/gcloud/reference/topic/escapingLog history:i was used to create instances with metadata as list using commas like this:gcloud compute instances create --metadata key1="value" key2=myValue key3=valueIndex1,valueIndex2,valueIndex3 key4=value4So I had a metadata key3 with "valueIndex1,valueIndex2,valueIndex3" as value.After the last update I was told to run as a list of metadata using commas and my list doesn't work anymore.So, i read about "gcloud topic escaping" and tried to use something like this:--metadata ^:^ key1="value":key2=myValue:key3=valueIndex1,valueIndex2,valueIndex3Which i found very confusing and still give warnings saying that I should use commas.So I tried (replacing my old comma-separated list from commas to ";" ) :--metadata key1="value",key2=myValue,key3=valueIndex1;valueIndex2;valueIndex3,key4=value4Which was horrible because gcloud tried to execute my key3 values as bash commands. So I believe i'm doing something wrong as it should be very simple.Can you help me please?
--
© 2014 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to a topic in the Google Groups "gce-discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gce-discussion/Dr2opDrqDtU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gce-discussio...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/22e99af1-fc77-4181-9e21-fb231cff380e%40googlegroups.com.
Rodrigo Lucena Borges
Bioinformata | Mendelics
Tel: +55 (11) 5096-6001 | E-mail: rodrigo...@mendelics.com.br
Rua Cubatão, 86, cj. 1602 | São Paulo, Brasil 04013-000