Reputation: 291
I was thinking if it is possible to concatenate a string using gcloud --format
For example:
gcloud redis instances describe redis1 --region us-central1 --format "redis://value(host):value(port)"
which results on redis://10.104.154.107:6379
Is it possible?
Upvotes: 1
Views: 493
Reputation: 75715
No, you can't. The format requires a valid key word (text, json,...). Here value() return only the value of the list of fields (comma separated).
To achieve what you want, it's much longer
echo "redis://$(gcloud redis instances describe redis1 --region us-central1 --format value(host))\
:$(gcloud redis instances describe redis1 --region us-central1 --format value(port))"
Upvotes: 2