Skip to main content

Connect a GCS archive bucket

This guide shows you how to configure a Google Cloud Storage (GCS) bucket to archive your Coralogix telemetry data in the US3 (us-central1) environment. For AWS environments, see Connect an S3 archive bucket.

Note

GCS archiving is currently available for the US3 environment only (us3.coralogix.com, region: us-central1). Contact your Coralogix representative for availability in other environments.

What you need

  • A GCP project with the Cloud Storage API active.
  • Permission to create buckets and manage Identity and Access Management (IAM) policies in your GCP project.

Choose a configuration method:

1.

Access the GCS archive module in the Coralogix Terraform Registry.

2.

Create the Terraform file with the following variables.

VariableDescription
gcp_regionThe GCP region for the archive buckets. Must match the region associated with your Coralogix account.
coralogix_service_accountThe Coralogix archive service account email. Contact your Coralogix representative to obtain this.
logs_bucket_nameName for the logs/traces archive bucket (leave empty if not needed).
metrics_bucket_nameName for the metrics archive bucket (leave empty if not needed).

Notes:

module "gcs-archive" {
source = "coralogix/google/coralogix//modules/v2/gcs-archive"

gcp_region = "us-central1"
coralogix_service_account = "coralogix-archive@your-cx-project.iam.gserviceaccount.com"
logs_bucket_name = "my-coralogix-logs-archive"
metrics_bucket_name = "my-coralogix-metrics-archive"
}
3.

[Optional] Add CMEK encryption to the buckets with logs_kms_key_name and metrics_kms_key_name variables. The module will automatically grant the GCS service agent the required roles/cloudkms.cryptoKeyEncrypterDecrypter role on the Cloud KMS key.

4.

Create the archive buckets by saving the file and running the following commands:

terraform init

terraform apply

How authentication works

Coralogix authenticates with GCS using GKE Workload Identity through the GCS S3-compatible API. The service account coralogix-archive-us3@coralogix-prod-saas-service.iam.gserviceaccount.com - no keys or credentials are exchanged. Granting this service account access in Step 2 is everything you need to do.

Storage costs

Use Standard storage class to avoid retrieval fees. If you use a different storage class, GCS charges a retrieval fee each time Coralogix reads archive data.

GCS Class A and Class B API operations are also billed to your GCP project. See GCS pricing for details.

Last updated on