gcf

Cloud Functions

Compute & WebGCP
General

General information about the service.

Description

Google Cloud Functions is a lightweight serverless compute platform for creating single-purpose functions that respond to events.

Service ID

cloudfunctions.googleapis.com

Resource Pattern

projects/{project}/locations/{location}/functions/{function}

Chat

Powered by AI

Talk to this service to learn more about it.

Suggested questions:

Naming

The conventions, rules, and restrictions for naming this service.

Naming Convention

gcf-{workload}-{environment}

Length

1-63

Valid Characters

Lowercase letters, numbers, hyphens

Scope

project

Code

Deploy your infrastructure as code using your preferred tooling.

Official DocumentationTerraform
terraform
1resource "google_cloudfunctions2_function" "main" {
2 name = "gcf-${var.environment}"
3 location = var.region
4
5 build_config {
6 runtime = "nodejs18"
7 entry_point = "helloHttp"
8 source {
9 storage_source {
10 bucket = google_storage_bucket.main.name
11 object = google_storage_bucket_object.main.name
12 }
13 }
14 }
15
16 service_config {
17 max_instance_count = 1
18 available_memory = "256M"
19 timeout_seconds = 60
20 }
21}
Utilities

Utilities to support app deployment or configuration.