/ Docs

PubNub

Last updated October 13, 2025 · View as Markdown

Pubnub-logo.svg PubNub is a web-based infrastructure-as-a-service (IaaS) communication Platform. It supports use cases including chat, virtual events, collaboration, alerting, IoT device control, real-time updates, and push notifications to help companies build engaging, scalable, and reliable apps.

In order to integrate PubNub with Relyance AI you will need a Publish Key, Subscribe Key, Secret Key, and UUID.

In PubNub:

  1. Login to your PubNub account.
  2. Go to the Admin Portal at PubNub Admin Portal
  3. Click on Apps in the left-side navigation menu.
  4. Click on the + CREATE NEW APP button on the right-side of the Apps page.

PubNub-1.png

PubNub-2.png

  1. Provide a name in the dialog box that pops up and click CREATE.

  2. Click on the new app card.

  3. Click on the new app card keyset on the resulting page.

PubNub-3.png

  1. Copy the Publish Key, Subscribe Key, and Secret Key from this page.
  2. The UUID is a unique identifier for this App, you will need to provide a unique string of up to 64 characters to help PubNub identify the client that connects to the PubNub platform. You can create this yourself. See this document for more info: How do I set the UUID?

In the Relyance AI application:

  1. Login to your Relyance account.
  2. Navigate to the Settings Menu in the bottom left-hand side.
  3. Select Integrations.
  4. Click on the Vendor Integration tab.
  5. Find the PubNub integration card and click it to open its connections.
  6. Under Authentication Method, choose Custom.
  7. Paste the Publish Key, Subscribe Key, Secret Key, and UUID into their respective fields.

PubNub-4.png

  1. Click Authenticate.
  2. At this point, you should see the following result on the Vendor Integrations page:

PubNub-5.png

  1. Congratulations, you are now connected to PubNub.

Manage this integration with Terraform

Connections for this integration can be managed as code with the Relyance Terraform provider. Non-secret fields go in auth.params; secret fields go in auth.secrets_wo, which is write-only — never stored in Terraform state. Rotate secrets by bumping auth.secrets_wo_version.

resource "relyance_integration_connection" "pubnub" {
  vendor = "pubnub"
  name   = "<your connection name>"

  auth = {
    method = "keyset"
    params = {
      uuid = "ade395ab-67eb-4df3-81b6-16b230803e10"
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      pubkey = var.pubnub_pubkey
      subkey = var.pubnub_subkey
      seckey = var.pubnub_seckey
    }
    secrets_wo_version = 1
  }

  scans = { "property-inspection" = { enabled = true } }
}