Add zone in GCP.#Config
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
This commit is contained in:
@@ -42,8 +42,15 @@ import (
|
||||
args: ["gcloud", "-q", "config", "set", "project", config.project]
|
||||
},
|
||||
|
||||
op.#Exec & {
|
||||
args: ["gcloud", "-q", "config", "set", "compute/region", config.region]
|
||||
if config.region != null {
|
||||
op.#Exec & {
|
||||
args: ["gcloud", "-q", "config", "set", "compute/region", config.region]
|
||||
}
|
||||
},
|
||||
if config.zone != null {
|
||||
op.#Exec & {
|
||||
args: ["gcloud", "-q", "config", "set", "compute/zone", config.zone]
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
|
@@ -8,9 +8,11 @@ import (
|
||||
// Base Google Cloud Config
|
||||
#Config: {
|
||||
// GCP region
|
||||
region: string @dagger(input)
|
||||
region: dagger.#Input & {*null | string}
|
||||
// GCP zone
|
||||
zone: dagger.#Input & {*null | string}
|
||||
// GCP project
|
||||
project: string @dagger(input)
|
||||
project: dagger.#Input & {string}
|
||||
// GCP service key
|
||||
serviceKey: dagger.#Secret @dagger(input)
|
||||
serviceKey: dagger.#Input & {dagger.#Secret}
|
||||
}
|
||||
|
Reference in New Issue
Block a user