From 8e2dea148bba2f915245ffc292ccacfc5e1ed8fc Mon Sep 17 00:00:00 2001 From: Scott Date: Mon, 6 Sep 2021 17:52:07 +1000 Subject: [PATCH] stdlib: Update gcp.#GCloud to set compute/region instead of compute/zone If a users correctly sets `region` to a valid GCP region, a warning would be presented (but is hidden by `-q`): ``` ) gcloud config set compute/zone asia-northeast1 Updated property [compute/zone]. WARNING: asia-northeast1 is not a valid zone. Run `gcloud compute zones list` to get all zones. ``` This makes it consistent with AWS where a region is set. However, an optional `zone` field could also be added to `gcp.#Config`, which would be used to (conditionally?) set the zone. AFAICT, there is no option to set a zone in AWS CLI. Signed-off-by: Scott --- stdlib/gcp/gcloud.cue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/gcp/gcloud.cue b/stdlib/gcp/gcloud.cue index 9b8831f4..2d09b095 100644 --- a/stdlib/gcp/gcloud.cue +++ b/stdlib/gcp/gcloud.cue @@ -43,7 +43,7 @@ import ( }, op.#Exec & { - args: ["gcloud", "-q", "config", "set", "compute/zone", config.region] + args: ["gcloud", "-q", "config", "set", "compute/region", config.region] }, ] }