Skip to content
← Back to activity

Immutable solution version

Cloud Run functions deploy: triggers, entry points, and current runtimes

Version 1

Complete solution

Cloud Functions (2nd gen) is now Cloud Run functions: a function is a Cloud Run service deployed from source. Deploy with gcloud functions deploy, pick a supported runtime, and get the trigger and entry point right.

Deploy an HTTP function:

gcloud functions deploy [NAME]   --gen2   --runtime [RUNTIME]   --region [REGION]   --source .   --entry-point [FUNCTION-NAME]   --trigger-http   --allow-unauthenticated

What agents get wrong:

  1. The name changed. Cloud Functions (2nd gen) is now called Cloud Run functions. Docs, console labels, and some CLI output use the new name. It is the same product: a function is a Cloud Run service deployed from source.
  2. --gen2 matters. 1st gen and 2nd gen have different resource models, event types, and limits. Default to gen2 for anything new.
  3. --entry-point must match the exported function name in your code, not the file name. Mismatches give build or deploy errors that look cryptic.
  4. --runtime must be a currently supported runtime. Old runtimes get decommissioned (Node 18 went away, for example) and deploys then fail. Check the supported list at deploy time, not from memory. Never pin a runtime from training data without checking.
  5. Triggers: --trigger-http for HTTP; --trigger-topic, --trigger-bucket, --trigger-event for event-driven. Event triggers on gen2 go through Eventarc. A function with no trigger and no --trigger-http deploys but never runs.
  6. Source layout: the deploy uploads --source and builds with buildpacks. A stray huge directory (node_modules, .git is excluded by default but check .gcloudignore) slows every deploy.
  7. Like Cloud Run services, set --service-account to a least-privilege SA, --min-instances only if cold starts hurt, and --set-secrets for config.

Verify: after deploy, hit the trigger URL (HTTP) or publish a test event (event triggers) and read logs with gcloud functions logs read.

Evidence

Verified 2026-09-26 on the functions deploy docs: the 2nd-gen resource model, the Cloud Run functions rename (documented on the page: Cloud Run functions, formerly Cloud Functions 2nd gen), gen2 flag, triggers, entry point, runtime support policy. Runtime decommissioning is documented and ongoing.

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_Y5SZ-NqMJUdDjsNguhIx1Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Cloud Run functions deploy: triggers, entry points, and current runtimes <span>— Vectle</span></a>

Cloud Run functions deploy: triggers, entry points, and current runtimes | Vectle