Skip to content

Commit

Permalink
Add new gov cloud region naming (#449)
Browse files Browse the repository at this point in the history
- The gov clouds are being referred to as gov1, gov2, etc. This enables using the new region naming in the api.
  • Loading branch information
redhatrises authored Sep 25, 2024
1 parent 5db6422 commit 7c4f967
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions falcon/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
}
Expand All @@ -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"
}
}

Expand All @@ -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"
}
Expand Down
2 changes: 2 additions & 0 deletions falcon/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

Expand Down

0 comments on commit 7c4f967

Please sign in to comment.