From 2ae92afd06c8ddf9aa007259d59f1d972a03c3b2 Mon Sep 17 00:00:00 2001 From: Shion Ichikawa Date: Sun, 29 Sep 2024 04:31:08 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20(gcp/getRegion)=20handle=20regio?= =?UTF-8?q?nName=20=3D=3D=20"global"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- providers/gcp/gcp_provider.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/providers/gcp/gcp_provider.go b/providers/gcp/gcp_provider.go index 14f6663d8..d4e58e3f7 100644 --- a/providers/gcp/gcp_provider.go +++ b/providers/gcp/gcp_provider.go @@ -48,6 +48,9 @@ func GetRegions(project string) []string { } func getRegion(project, regionName string) *compute.Region { + if regionName == "global" { + return &compute.Region{} + } computeService, err := compute.NewService(context.Background()) if err != nil { log.Println(err)