Google Cloud Run
Official · maintained by Marmotmarmotdata/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
In the UI
Point-and-click, no config file needed.
- 1 Open Runs Create pipeline
- 2 Pick Google Cloud Run from the plugin list.
- 3 Fill in the wizard, set a schedule, save.
With the CLI
Save a YAML config, then run marmot ingest.
name: my-cloudrun-pipeline
runs:
- cloudrun:
project_id: "<project_id>"$ marmot ingest -c ingest.yamlNot using plugins? Other ways to populate Marmot
Configuration
12 top-level fields. * marks required fields.
tags multiselect Tags to apply to discovered assets
external_links object[] External links to show on all assets
name string Display name for the link
icon string Icon identifier for the link
url string URL to the external resource
filter object Filter discovered assets by name (regex)
include multiselect Include patterns for resource names (regex)
exclude multiselect Exclude patterns for resource names (regex)
project_id string Google Cloud project ID
locations multiselect Regions to scan. Every region is scanned when this is empty
credentials_file string Path to service account JSON file
credentials_json password Service account JSON content
endpoint string Custom endpoint URL, for testing against a local server
disable_auth bool Disable authentication, for local testing
include_jobs bool Whether to discover jobs
- default
- true
include_executions bool Whether to read recent job executions as run history
- default
- true
max_executions_per_job int How many recent executions to read per job
- default
- 10
Assets emitted
Metadata this plugin attaches to each discovered asset.
Service
ServiceFieldsThe metadata the Cloud Run plugin emits for a Service asset.
uid stringServer-assigned unique identifier for the service
generation intNumber of times the service configuration has changed
location stringRegion the service runs in
project_id stringGoogle Cloud project the service belongs to
uri stringHTTPS endpoint the service is served on
ingress stringWhich traffic is allowed to reach the service
launch_stage stringGoogle Cloud launch stage of the features the service uses
creator stringPrincipal that created the service
last_modifier stringPrincipal that last modified the service
create_time stringCreation timestamp
update_time stringLast update timestamp
latest_ready_revision stringId of the most recent revision that became ready
latest_created_revision stringId of the most recently created revision
traffic stringTraffic split across revisions, for example latest=100
ready stringState of the service terminal condition
reconciling boolWhether the service is still converging on its desired state
execution_environment stringSandbox generation the containers run in
service_account stringService account the containers run as
timeout stringMaximum duration of a single request
max_instance_request_concurrency intConcurrent requests one instance accepts
min_instance_count intMinimum number of instances kept running
max_instance_count intMaximum number of instances the service scales to
container_image stringImage of the first container
container_images string[]Images of every container in the revision
container_ports int[]Ports the containers listen on
env_var_names string[]Names of the container environment variables. Values are never recorded
vpc_connector stringServerless VPC Access connector the service uses
vpc_egress stringWhich outbound traffic is routed through the VPC
gcs_volume_buckets string[]Cloud Storage buckets mounted as volumes
cloud_sql_instances string[]Cloud SQL instances mounted as volumes, as project:region:instance
secret_volumes string[]Names of the Secret Manager secrets mounted as volumes. Values are never recorded
nfs_volumes string[]NFS mounts, as server:path
Job
JobFieldsThe metadata the Cloud Run plugin emits for a Job asset.
uid stringServer-assigned unique identifier for the job
generation intNumber of times the job configuration has changed
location stringRegion the job runs in
project_id stringGoogle Cloud project the job belongs to
creator stringPrincipal that created the job
last_modifier stringPrincipal that last modified the job
create_time stringCreation timestamp
update_time stringLast update timestamp
launch_stage stringGoogle Cloud launch stage of the features the job uses
execution_count intNumber of executions created for the job
latest_created_execution stringId of the most recently created execution
reconciling boolWhether the job is still converging on its desired state
task_count intNumber of tasks one execution runs
parallelism intHow many tasks may run at the same time
max_retries intRetries allowed per failed task
execution_environment stringSandbox generation the tasks run in
service_account stringService account the tasks run as
timeout stringMaximum duration of a single task
container_image stringImage of the first container
container_images string[]Images of every container in the task
container_ports int[]Ports the containers listen on
env_var_names string[]Names of the container environment variables. Values are never recorded
vpc_connector stringServerless VPC Access connector the job uses
vpc_egress stringWhich outbound traffic is routed through the VPC
gcs_volume_buckets string[]Cloud Storage buckets mounted as volumes
cloud_sql_instances string[]Cloud SQL instances mounted as volumes, as project:region:instance
secret_volumes string[]Names of the Secret Manager secrets mounted as volumes. Values are never recorded
nfs_volumes string[]NFS mounts, as server:path
Run Facet
RunFacetFieldsThe facets attached to each job run event.
task_count intTasks the execution was asked to run
succeeded_count intTasks that succeeded
failed_count intTasks that failed
cancelled_count intTasks that were cancelled
retried_count intTasks that were retried
log_uri stringCloud Logging link for the execution