gcp-cloud-run
Provides functions for deploying Cloud Run services and jobs, managing revisions,streaming logs, and checking deployment status with built-in health verification.
Installation
dagger install github.com/telchak/daggerverse/gcp-cloud-run@v0.1.0Entrypoint
Return Type
GcpCloudRun ! Example
dagger -m github.com/telchak/daggerverse/gcp-cloud-run@010621c997378db92da5969584001be575c5e5a7 call \
func (m *MyModule) Example() *dagger.GcpCloudRun {
return dag.
GcpCloudRun()
}@function
def example() -> dagger.GcpCloudRun:
return (
dag.gcp_cloud_run()
)@func()
example(): GcpCloudRun {
return dag
.gcpCloudRun()
}Types
GcpCloudRunRunService 🔗
Cloud Run service operations.
delete() 🔗
Delete a Cloud Run service.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| gcloud | Container ! | - | Authenticated gcloud container |
| serviceName | String ! | - | Service name |
| region | String ! | "us-central1" | GCP region |
Example
dagger -m github.com/telchak/daggerverse/gcp-cloud-run@010621c997378db92da5969584001be575c5e5a7 call \
service \
delete --gcloud IMAGE:TAG --service-name string --region stringfunc (m *MyModule) Example(ctx context.Context, gcloud *dagger.Container, serviceName string, region string) string {
return dag.
GcpCloudRun().
Service().
Delete(ctx, gcloud, serviceName, region)
}@function
async def example(gcloud: dagger.Container, service_name: str, region: str) -> str:
return await (
dag.gcp_cloud_run()
.service()
.delete(gcloud, service_name, region)
)@func()
async example(gcloud: Container, serviceName: string, region: string): Promise<string> {
return dag
.gcpCloudRun()
.service()
.delete(gcloud, serviceName, region)
}deploy() 🔗
Deploy a Cloud Run service.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| gcloud | Container ! | - | Authenticated gcloud container |
| image | String ! | - | Container image URI |
| serviceName | String ! | - | Service name |
| region | String ! | "us-central1" | GCP region |
| port | Integer ! | 8080 | Container port |
| cpu | String ! | "1" | CPU allocation |
| memory | String ! | "512Mi" | Memory allocation |
| minInstances | Integer ! | 0 | Minimum instances |
| maxInstances | Integer ! | 10 | Maximum instances |
| concurrency | Integer ! | 80 | Max concurrent requests |
| timeout | String ! | "300s" | Request timeout |
| allowUnauthenticated | Boolean ! | false | Allow public access |
| envVars | [String ! ] ! | [] | Environment variables (KEY=VALUE) |
| secrets | [String ! ] ! | [] | Secrets (NAME=VERSION) |
| vpcConnector | String ! | "" | VPC connector |
| serviceAccount | String ! | "" | Service account email |
| cpuBoost | Boolean ! | false | Enable CPU boost during startup |
Example
dagger -m github.com/telchak/daggerverse/gcp-cloud-run@010621c997378db92da5969584001be575c5e5a7 call \
service \
deploy --gcloud IMAGE:TAG --image string --service-name string --region string --port integer --cpu string --memory string --min-instances integer --max-instances integer --concurrency integer --timeout string --allow-unauthenticated boolean --env-vars string1 --env-vars string2 --secrets string1 --secrets string2 --vpc-connector string --service-account string --cpu-boost booleanfunc (m *MyModule) Example(ctx context.Context, gcloud *dagger.Container, image string, serviceName string, region string, port int, cpu string, memory string, minInstances int, maxInstances int, concurrency int, timeout string, allowUnauthenticated bool, envVars []string, secrets []string, vpcConnector string, serviceAccount string, cpuBoost bool) string {
return dag.
GcpCloudRun().
Service().
Deploy(ctx, gcloud, image, serviceName, region, port, cpu, memory, minInstances, maxInstances, concurrency, timeout, allowUnauthenticated, envVars, secrets, vpcConnector, serviceAccount, cpuBoost)
}@function
async def example(gcloud: dagger.Container, image: str, service_name: str, region: str, port: int, cpu: str, memory: str, min_instances: int, max_instances: int, concurrency: int, timeout: str, allow_unauthenticated: bool, env_vars: List[str], secrets: List[str], vpc_connector: str, service_account: str, cpu_boost: bool) -> str:
return await (
dag.gcp_cloud_run()
.service()
.deploy(gcloud, image, service_name, region, port, cpu, memory, min_instances, max_instances, concurrency, timeout, allow_unauthenticated, env_vars, secrets, vpc_connector, service_account, cpu_boost)
)@func()
async example(gcloud: Container, image: string, serviceName: string, region: string, port: number, cpu: string, memory: string, minInstances: number, maxInstances: number, concurrency: number, timeout: string, allowUnauthenticated: boolean, envVars: string[], secrets: string[], vpcConnector: string, serviceAccount: string, cpuBoost: boolean): Promise<string> {
return dag
.gcpCloudRun()
.service()
.deploy(gcloud, image, serviceName, region, port, cpu, memory, minInstances, maxInstances, concurrency, timeout, allowUnauthenticated, envVars, secrets, vpcConnector, serviceAccount, cpuBoost)
}exists() 🔗
Check if a Cloud Run service exists.
Return Type
Boolean !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| gcloud | Container ! | - | Authenticated gcloud container |
| serviceName | String ! | - | Service name |
| region | String ! | "us-central1" | GCP region |
Example
dagger -m github.com/telchak/daggerverse/gcp-cloud-run@010621c997378db92da5969584001be575c5e5a7 call \
service \
exists --gcloud IMAGE:TAG --service-name string --region stringfunc (m *MyModule) Example(ctx context.Context, gcloud *dagger.Container, serviceName string, region string) bool {
return dag.
GcpCloudRun().
Service().
Exists(ctx, gcloud, serviceName, region)
}@function
async def example(gcloud: dagger.Container, service_name: str, region: str) -> bool:
return await (
dag.gcp_cloud_run()
.service()
.exists(gcloud, service_name, region)
)@func()
async example(gcloud: Container, serviceName: string, region: string): Promise<boolean> {
return dag
.gcpCloudRun()
.service()
.exists(gcloud, serviceName, region)
}getLogs() 🔗
Read logs from a Cloud Run service.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| gcloud | Container ! | - | Authenticated gcloud container |
| serviceName | String ! | - | Service name |
| region | String ! | "us-central1" | GCP region |
| limit | Integer ! | 50 | Maximum number of log entries |
| logFilter | String ! | "" | Additional log filter (e.g., 'severity>=ERROR') |
Example
dagger -m github.com/telchak/daggerverse/gcp-cloud-run@010621c997378db92da5969584001be575c5e5a7 call \
service \
get-logs --gcloud IMAGE:TAG --service-name string --region string --limit integer --log-filter stringfunc (m *MyModule) Example(ctx context.Context, gcloud *dagger.Container, serviceName string, region string, limit int, logFilter string) string {
return dag.
GcpCloudRun().
Service().
GetLogs(ctx, gcloud, serviceName, region, limit, logFilter)
}@function
async def example(gcloud: dagger.Container, service_name: str, region: str, limit: int, log_filter: str) -> str:
return await (
dag.gcp_cloud_run()
.service()
.get_logs(gcloud, service_name, region, limit, log_filter)
)@func()
async example(gcloud: Container, serviceName: string, region: string, limit: number, logFilter: string): Promise<string> {
return dag
.gcpCloudRun()
.service()
.getLogs(gcloud, serviceName, region, limit, logFilter)
}getUrl() 🔗
Get the URL of a deployed service.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| gcloud | Container ! | - | Authenticated gcloud container |
| serviceName | String ! | - | Service name |
| region | String ! | "us-central1" | GCP region |
Example
dagger -m github.com/telchak/daggerverse/gcp-cloud-run@010621c997378db92da5969584001be575c5e5a7 call \
service \
get-url --gcloud IMAGE:TAG --service-name string --region stringfunc (m *MyModule) Example(ctx context.Context, gcloud *dagger.Container, serviceName string, region string) string {
return dag.
GcpCloudRun().
Service().
GetUrl(ctx, gcloud, serviceName, region)
}@function
async def example(gcloud: dagger.Container, service_name: str, region: str) -> str:
return await (
dag.gcp_cloud_run()
.service()
.get_url(gcloud, service_name, region)
)@func()
async example(gcloud: Container, serviceName: string, region: string): Promise<string> {
return dag
.gcpCloudRun()
.service()
.getUrl(gcloud, serviceName, region)
}GcpCloudRunRunJob 🔗
Cloud Run job operations.
delete() 🔗
Delete a Cloud Run job.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| gcloud | Container ! | - | Authenticated gcloud container |
| jobName | String ! | - | Job name |
| region | String ! | "us-central1" | GCP region |
Example
dagger -m github.com/telchak/daggerverse/gcp-cloud-run@010621c997378db92da5969584001be575c5e5a7 call \
job \
delete --gcloud IMAGE:TAG --job-name string --region stringfunc (m *MyModule) Example(ctx context.Context, gcloud *dagger.Container, jobName string, region string) string {
return dag.
GcpCloudRun().
Job().
Delete(ctx, gcloud, jobName, region)
}@function
async def example(gcloud: dagger.Container, job_name: str, region: str) -> str:
return await (
dag.gcp_cloud_run()
.job()
.delete(gcloud, job_name, region)
)@func()
async example(gcloud: Container, jobName: string, region: string): Promise<string> {
return dag
.gcpCloudRun()
.job()
.delete(gcloud, jobName, region)
}deploy() 🔗
Deploy a Cloud Run job.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| gcloud | Container ! | - | Authenticated gcloud container |
| image | String ! | - | Container image URI |
| jobName | String ! | - | Job name |
| region | String ! | "us-central1" | GCP region |
| cpu | String ! | "1" | CPU allocation |
| memory | String ! | "512Mi" | Memory allocation |
| maxRetries | Integer ! | 0 | Max retry attempts |
| timeout | String ! | "600s" | Task timeout |
| parallelism | Integer ! | 1 | Number of parallel tasks |
| tasks | Integer ! | 1 | Number of tasks to execute |
| envVars | [String ! ] ! | [] | Environment variables (KEY=VALUE) |
| secrets | [String ! ] ! | [] | Secrets (NAME=VERSION) |
| vpcConnector | String ! | "" | VPC connector |
| serviceAccount | String ! | "" | Service account email |
| command | [String ! ] ! | [] | Override container command |
| args | [String ! ] ! | [] | Override container args |
Example
dagger -m github.com/telchak/daggerverse/gcp-cloud-run@010621c997378db92da5969584001be575c5e5a7 call \
job \
deploy --gcloud IMAGE:TAG --image string --job-name string --region string --cpu string --memory string --max-retries integer --timeout string --parallelism integer --tasks integer --env-vars string1 --env-vars string2 --secrets string1 --secrets string2 --vpc-connector string --service-account string --command string1 --command string2 --args string1 --args string2func (m *MyModule) Example(ctx context.Context, gcloud *dagger.Container, image string, jobName string, region string, cpu string, memory string, maxRetries int, timeout string, parallelism int, tasks int, envVars []string, secrets []string, vpcConnector string, serviceAccount string, command []string, args []string) string {
return dag.
GcpCloudRun().
Job().
Deploy(ctx, gcloud, image, jobName, region, cpu, memory, maxRetries, timeout, parallelism, tasks, envVars, secrets, vpcConnector, serviceAccount, command, args)
}@function
async def example(gcloud: dagger.Container, image: str, job_name: str, region: str, cpu: str, memory: str, max_retries: int, timeout: str, parallelism: int, tasks: int, env_vars: List[str], secrets: List[str], vpc_connector: str, service_account: str, command: List[str], args: List[str]) -> str:
return await (
dag.gcp_cloud_run()
.job()
.deploy(gcloud, image, job_name, region, cpu, memory, max_retries, timeout, parallelism, tasks, env_vars, secrets, vpc_connector, service_account, command, args)
)@func()
async example(gcloud: Container, image: string, jobName: string, region: string, cpu: string, memory: string, maxRetries: number, timeout: string, parallelism: number, tasks: number, envVars: string[], secrets: string[], vpcConnector: string, serviceAccount: string, command: string[], args: string[]): Promise<string> {
return dag
.gcpCloudRun()
.job()
.deploy(gcloud, image, jobName, region, cpu, memory, maxRetries, timeout, parallelism, tasks, envVars, secrets, vpcConnector, serviceAccount, command, args)
}execute() 🔗
Execute a Cloud Run job.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| gcloud | Container ! | - | Authenticated gcloud container |
| jobName | String ! | - | Job name |
| region | String ! | "us-central1" | GCP region |
| wait | Boolean ! | true | Wait for execution to complete |
Example
dagger -m github.com/telchak/daggerverse/gcp-cloud-run@010621c997378db92da5969584001be575c5e5a7 call \
job \
execute --gcloud IMAGE:TAG --job-name string --region string --wait booleanfunc (m *MyModule) Example(ctx context.Context, gcloud *dagger.Container, jobName string, region string, wait bool) string {
return dag.
GcpCloudRun().
Job().
Execute(ctx, gcloud, jobName, region, wait)
}@function
async def example(gcloud: dagger.Container, job_name: str, region: str, wait: bool) -> str:
return await (
dag.gcp_cloud_run()
.job()
.execute(gcloud, job_name, region, wait)
)@func()
async example(gcloud: Container, jobName: string, region: string, wait: boolean): Promise<string> {
return dag
.gcpCloudRun()
.job()
.execute(gcloud, jobName, region, wait)
}getLogs() 🔗
Read logs from a Cloud Run job.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| gcloud | Container ! | - | Authenticated gcloud container |
| jobName | String ! | - | Job name |
| region | String ! | "us-central1" | GCP region |
| limit | Integer ! | 50 | Maximum number of log entries |
| logFilter | String ! | "" | Additional log filter (e.g., 'severity>=ERROR') |
Example
dagger -m github.com/telchak/daggerverse/gcp-cloud-run@010621c997378db92da5969584001be575c5e5a7 call \
job \
get-logs --gcloud IMAGE:TAG --job-name string --region string --limit integer --log-filter stringfunc (m *MyModule) Example(ctx context.Context, gcloud *dagger.Container, jobName string, region string, limit int, logFilter string) string {
return dag.
GcpCloudRun().
Job().
GetLogs(ctx, gcloud, jobName, region, limit, logFilter)
}@function
async def example(gcloud: dagger.Container, job_name: str, region: str, limit: int, log_filter: str) -> str:
return await (
dag.gcp_cloud_run()
.job()
.get_logs(gcloud, job_name, region, limit, log_filter)
)@func()
async example(gcloud: Container, jobName: string, region: string, limit: number, logFilter: string): Promise<string> {
return dag
.gcpCloudRun()
.job()
.getLogs(gcloud, jobName, region, limit, logFilter)
}GcpCloudRun 🔗
Google Cloud Run deployment utilities.
job() 🔗
Access Cloud Run job operations.
Return Type
GcpCloudRunRunJob ! Example
dagger -m github.com/telchak/daggerverse/gcp-cloud-run@010621c997378db92da5969584001be575c5e5a7 call \
jobfunc (m *MyModule) Example() *dagger.GcpCloudRunRunJob {
return dag.
GcpCloudRun().
Job()
}@function
def example() -> dagger.GcpCloudRunRunJob:
return (
dag.gcp_cloud_run()
.job()
)@func()
example(): GcpCloudRunRunJob {
return dag
.gcpCloudRun()
.job()
}service() 🔗
Access Cloud Run service operations.
Return Type
GcpCloudRunRunService ! Example
dagger -m github.com/telchak/daggerverse/gcp-cloud-run@010621c997378db92da5969584001be575c5e5a7 call \
servicefunc (m *MyModule) Example() *dagger.GcpCloudRunRunService {
return dag.
GcpCloudRun().
Service()
}@function
def example() -> dagger.GcpCloudRunRunService:
return (
dag.gcp_cloud_run()
.service()
)@func()
example(): GcpCloudRunRunService {
return dag
.gcpCloudRun()
.service()
}