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 <slewiskelly@slewiskel.ly>
This commit is contained in:
Scott 2021-09-06 17:52:07 +10:00 committed by Guillaume de Rouville
parent 4d45e269e0
commit 8e2dea148b

View File

@ -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]
},
]
}