marmotdata/pubsub
Discover topics and subscriptions from Google Cloud Pub/Sub
The Google Pub/Sub plugin discovers topics and subscriptions from a Google Cloud project, along with the links between them and the systems a subscription exports to.
Topics carry their labels, message storage policy, retention and schema. Subscriptions carry their delivery type (pull, push, BigQuery or Cloud Storage), acknowledgement settings, filter and dead letter policy.
Authentication
With neither credentials_file nor credentials_json set, Application Default Credentials are used. The service account needs roles/pubsub.viewer; without it, schemas are skipped and discovery continues.
Emulator
Set emulator_host to a host:port address to run against the Pub/Sub emulator. The connection then uses plaintext gRPC with no credentials, and assets get no Google Cloud console links.
Sample Messages
With include_sample_messages: true, asset previews read up to 20 messages from a pull subscription for 5 seconds. Every message is nacked, so Pub/Sub redelivers it to the real consumer straight after.
Keyless authentication
On Marmot Cloud or Marmot Enterprise the pipeline can present its own identity instead of a service account key. Set workload_identity_provider to a Workload Identity Federation provider that trusts your Marmot instance as an OIDC issuer, and grant the pipeline's subject, pipeline:<name> as reported by the pipeline API, the role above directly (principal://iam.googleapis.com/<pool>/subject/pipeline:<name>), or grant it roles/iam.workloadIdentityUser on a service account named in service_account. No key exists anywhere; Marmot mints a short-lived token for each run.
In the UI
Point and click, no config file needed.
- Open Runs and choose Create pipeline.
- Pick Google Pub/Sub from the plugin list.
- Fill in the settings, set a schedule and save.
With the CLI
Save a YAML config, then run marmot ingest.
Not using plugins? Other ways to populate Marmot
Configuration
Fields marked Required must be set.
tagsList of textTags to apply to discovered assets
external_linksList of groupsExternal links to show on all assets
nameTextDisplay name for the link
iconTextIcon identifier for the link
urlTextURL to the external resource
filterGroup of settingsFilter discovered assets by name (regex)
includeList of textInclude patterns for resource names (regex)
excludeList of textExclude patterns for resource names (regex)
zoneTextTells this system apart from others of the same technology and becomes part of every asset's MRN
audienceTextAudience of the Marmot identity token. Derived from the credentials' federation settings; set it only when the cloud side expects another
project_idText RequiredGoogle Cloud project ID
emulator_hostTextAddress of a Pub/Sub emulator, for example localhost:8085
credentials_fileTextPath to a service account JSON file
credentials_jsonSecretService account JSON content
workload_identity_providerTextWorkload Identity Federation provider to exchange the Marmot identity token at, projects/<number>/locations/global/workloadIdentityPools/<pool>/providers/<provider>. Setting it federates: no key is needed; bind the pipeline's subject on the Google Cloud side
service_accountTextService account to impersonate after the exchange; empty acts as the federated principal directly
include_subscriptionsYes or noWhether to discover subscriptions
include_schemasYes or noWhether to attach topic schemas and their fields
include_dead_letter_topicsYes or noWhether to record dead letter topics on subscriptions
include_sample_messagesYes or noWhether to allow reading sample messages for asset previews
Assets emitted
Metadata this plugin attaches to each discovered asset.
Topic
The metadata fields the plugin emits for topic assets.
Subscription
The metadata fields the plugin emits for subscription assets.
Topic Column
The per-field entries the plugin derives from a topic's Avro schema. Only the top level of the record is expanded.