Gcp cloud functions

From aj-geddes/useful-ai-prompts · View interactive version

Gcp cloud functions is an AI agent skill from the GitHub repository aj-geddes/useful-ai-prompts. Deploy serverless functions on Google Cloud Platform with triggers, IAM roles, environment variables, and monitoring. Use for event-driven computing on GCP.

How to use this skill

Skill file

GCP Cloud Functions

Table of Contents

Overview

Google Cloud Functions enables event-driven serverless computing on Google Cloud Platform. Build functions with automatic scaling, integrated security, and seamless integration with Google Cloud services for rapid development.

When to Use

Quick Start

Minimal working example:

# Install Google Cloud SDK
curl https://sdk.cloud.google.com | bash
exec -l $SHELL

# Initialize and authenticate
gcloud init
gcloud auth application-default login

# Set project
gcloud config set project MY_PROJECT_ID

# Create service account
gcloud iam service-accounts create cloud-function-sa \
  --display-name "Cloud Function Service Account"

# Grant permissions
gcloud projects add-iam-policy-binding MY_PROJECT_ID \
  --member="serviceAccount:cloud-function-sa@MY_PROJECT_ID.iam.gserviceaccount.com" \
  --role="roles/cloudfunctions.invoker"

# Deploy HTTP function
gcloud functions deploy my-http-function \
  --gen2 \
  --runtime nodejs18 \
  --region us-central1 \
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

| Guide | Contents |

|---|---|

| Cloud Function Creation with gcloud CLI | Cloud Function Creation with gcloud CLI |

| Cloud Functions Implementation (Node.js) | Cloud Functions Implementation (Node.js) |

| Terraform Cloud Functions Configuration | Terraform Cloud Functions Configuration |

Best Practices

✅ DO

❌ DON'T

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.