Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement(gcp_chronicle sink): add support for all Google SecOps regional endpoints #22033

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
6 changes: 6 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,12 @@ otel
otelcol
siv
onig
aviv
dammam
doha
mumbai
paulo
turin
AIXM
AUTOSAR
CDMA
Expand Down
3 changes: 3 additions & 0 deletions changelog.d/add_chronicle_regional_endpoints.enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Add support for more chronicle regional endpoints as listed - https://cloud.google.com/chronicle/docs/reference/ingestion-api#regional_endpoints

authors: chocpanda
64 changes: 61 additions & 3 deletions src/sinks/gcp_chronicle/chronicle_unstructured.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,56 @@ pub enum GcsHealthcheckError {
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum Region {
/// EU region.
/// European Multi region
Eu,

/// US region.
/// US Multi region
Us,

/// APAC region.
/// APAC region (this is the same as the Singapore region endpoint retained for backwards compatibility)
Asia,

/// SãoPaulo Region
SãoPaulo,

/// Canada Region
Canada,

/// Dammam Region
Dammam,

/// Doha Region
Doha,

/// Frankfurt Region
Frankfurt,

/// London Region
London,

/// Mumbai Region
Mumbai,

/// Paris Region
Paris,

/// Singapore Region
Singapore,

/// Sydney Region
Sydney,

/// TelAviv Region
TelAviv,

/// Tokyo Region
Tokyo,

/// Turin Region
Turin,

/// Zurich Region
Zurich,
}

impl Region {
Expand All @@ -86,6 +128,22 @@ impl Region {
Region::Eu => "https://europe-malachiteingestion-pa.googleapis.com",
Region::Us => "https://malachiteingestion-pa.googleapis.com",
Region::Asia => "https://asia-southeast1-malachiteingestion-pa.googleapis.com",
Region::SãoPaulo => "https://southamerica-east1-malachiteingestion-pa.googleapis.com",
Region::Canada => {
"https://northamerica-northeast2-malachiteingestion-pa.googleapis.com"
}
Region::Dammam => "https://me-central2-malachiteingestion-pa.googleapis.com",
Region::Doha => "https://me-central1-malachiteingestion-pa.googleapis.com",
Region::Frankfurt => "https://europe-west3-malachiteingestion-pa.googleapis.com",
Region::London => "https://europe-west2-malachiteingestion-pa.googleapis.com",
Region::Mumbai => "https://asia-south1-malachiteingestion-pa.googleapis.com",
Region::Paris => "https://europe-west9-malachiteingestion-pa.googleapis.com",
Region::Singapore => "https://asia-southeast1-malachiteingestion-pa.googleapis.com",
Region::Sydney => "https://australia-southeast1-malachiteingestion-pa.googleapis.com",
Region::TelAviv => "https://me-west1-malachiteingestion-pa.googleapis.com",
Region::Tokyo => "https://asia-northeast1-malachiteingestion-pa.googleapis.com",
Region::Turin => "https://europe-west12-malachiteingestion-pa.googleapis.com",
Region::Zurich => "https://europe-west6-malachiteingestion-pa.googleapis.com",
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,23 @@ base: components: sinks: gcp_chronicle_unstructured: configuration: {
description: "The GCP region to use."
required: false
type: string: enum: {
asia: "APAC region."
eu: "EU region."
us: "US region."
asia: "APAC region (this is the same as the Singapore region endpoint retained for backwards compatibility)"
canada: "Canada Region"
dammam: "Dammam Region"
doha: "Doha Region"
eu: "European Multi region"
frankfurt: "Frankfurt Region"
london: "London Region"
mumbai: "Mumbai Region"
paris: "Paris Region"
singapore: "Singapore Region"
sydney: "Sydney Region"
são_paulo: "SãoPaulo Region"
tel_aviv: "TelAviv Region"
tokyo: "Tokyo Region"
turin: "Turin Region"
us: "US Multi region"
zurich: "Zurich Region"
}
}
request: {
Expand Down