From 7c4f96703ee9f5cda071910296647ed9300bc467 Mon Sep 17 00:00:00 2001 From: Gabe Alford Date: Wed, 25 Sep 2024 15:57:42 -0600 Subject: [PATCH] Add new gov cloud region naming (#449) - The gov clouds are being referred to as gov1, gov2, etc. This enables using the new region naming in the api. --- falcon/cloud.go | 7 +++++++ falcon/containers.go | 2 ++ 2 files changed, 9 insertions(+) diff --git a/falcon/cloud.go b/falcon/cloud.go index f6a6d3df..8b227ab1 100644 --- a/falcon/cloud.go +++ b/falcon/cloud.go @@ -19,6 +19,7 @@ const ( CloudUs2 CloudEu1 CloudUsGov1 + CloudGov1 ) // Cloud parses cloud string (example: us-1, us-2, eu-1, us-gov-1, etc). If a string is not recognized CloudUs1 is returned. @@ -44,6 +45,8 @@ func CloudValidate(cloudString string) (CloudType, error) { return CloudEu1, nil case "us-gov-1": return CloudUsGov1, nil + case "gov1": + return CloudGov1, nil } return CloudUs1, fmt.Errorf("unrecognized CrowdStrike Falcon Cloud: %s", lower) } @@ -61,6 +64,8 @@ func (c CloudType) Host() string { return "api.eu-1.crowdstrike.com" case CloudUsGov1: return "api.laggar.gcw.crowdstrike.com" + case CloudGov1: + return "api.laggar.gcw.crowdstrike.com" } } @@ -76,6 +81,8 @@ func (c CloudType) String() string { return "eu-1" case CloudUsGov1: return "us-gov-1" + case CloudGov1: + return "gov1" default: return "UNKNOWN FALCON CLOUD REGION" } diff --git a/falcon/containers.go b/falcon/containers.go index 2aec859e..414469cc 100644 --- a/falcon/containers.go +++ b/falcon/containers.go @@ -26,6 +26,8 @@ func FalconContainerUploadURI(falconCloud CloudType) string { return "container-upload.eu-1.crowdstrike.com" case CloudUsGov1: return "container-upload.laggar.gcw.crowdstrike.com" + case CloudGov1: + return "container-upload.laggar.gcw.crowdstrike.com" } }