marmotdata/cloudrun
Discover services and jobs from Google Cloud Run
The Cloud Run plugin discovers services and jobs from a Google Cloud project using the Cloud Run Admin API v2. It records the deployed image, scaling, networking and volume configuration of each workload, the execution count of each job, and the recent executions of each job as run history.
Every region is scanned in one call unless locations is set. Regions Cloud Run reports as unreachable are logged and skipped rather than failing the run.
Connection Examples
Lineage
Cloud Run only reveals a data dependency through a volume mount. A Cloud Storage volume becomes a FEEDS edge from the bucket to the service or job that mounts it, matching the identity the gcs plugin gives that bucket.
Cloud SQL volumes are recorded in the cloud_sql_instances metadata field but produce no edge: the API does not say which engine an instance runs, so there is no provider to address it by.
Required Permissions
The service account needs the following IAM role:
- Cloud Run Viewer (
roles/run.viewer) - For listing services, jobs and executions
Or use a custom role with these permissions:
run.services.listrun.jobs.listrun.executions.list
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 Cloud Run 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
locationsList of textRegions to scan. Every region is scanned when this is empty
credentials_fileTextPath to 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
endpointTextCustom endpoint URL, for testing against a local server
disable_authYes or noDisable authentication, for local testing
include_jobsYes or noWhether to discover jobs
include_executionsYes or noWhether to read recent job executions as run history
max_executions_per_jobNumberHow many recent executions to read per job
Assets emitted
Metadata this plugin attaches to each discovered asset.
Service
The metadata the Cloud Run plugin emits for a Service asset.
Job
The metadata the Cloud Run plugin emits for a Job asset.
Run Facet
The facets attached to each job run event.