Our next-gen architecture is built to help you make sense of your ever-growing data Watch a 4-min demo video!

Back to All Integrations

GCP Pub/Sub Terraform Module GCP Pub/Sub Terraform Module

Last Updated: May. 30, 2023

Terraform simplifies the way we deploy our infrastructure and allows us to maintain it as code.

Using our Terraform Modules, you can easily install and manage Coralogix integrations with GCP services as modules in your infrastructure code.

Our modules are open source and available on our Github and in the Terraform Registry.


This module will be installing our function app that gets messages from your Pub/Sub topic and sends logs to Coralogix.

For more information about the Function itself, dynamic applicationName and subsystemName and multiline support visit our Pub/Sub guide.

To use the module, first, add the provider configure block to your Terraform project:

terraform {
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = ">= 4.31.0"

provider "google" {
  project = "your-project-id"
  region  = "your-region"

Then simply add this declaration to your Terraform project:

module "pubsub" {
  source = "coralogix/google/coralogix//modules/pubsub"

  coralogix_region = "Europe"
  private_key      = "2f55c873-c0cf-4523-82d4-c3b68ee6cb46"
  application_name = "Pub/Sub"
  subsystem_name   = "logs"
  topic           = "test-topic-name"

Important variables to change:

On this page