Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:19:40 +08:00
commit 18b893a2fa
4 changed files with 207 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
{
"name": "jeremy-genkit-terraform",
"description": "Terraform modules for Firebase Genkit infrastructure and deployments",
"version": "1.0.0",
"author": {
"name": "Jeremy Longshore",
"email": "jeremy@intentsolutions.io"
},
"skills": [
"./skills"
]
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# jeremy-genkit-terraform
Terraform modules for Firebase Genkit infrastructure and deployments

45
plugin.lock.json Normal file
View File

@@ -0,0 +1,45 @@
{
"$schema": "internal://schemas/plugin.lock.v1.json",
"pluginId": "gh:jeremylongshore/claude-code-plugins-plus:plugins/devops/jeremy-genkit-terraform",
"normalized": {
"repo": null,
"ref": "refs/tags/v20251128.0",
"commit": "aa17e2563c4358aa34851528d21175227d8e6f31",
"treeHash": "05d57b6fa2d5d669fdb730d1ecc4f314e37cbdb9f24d81183ef755056ff1c178",
"generatedAt": "2025-11-28T10:18:54.309162Z",
"toolVersion": "publish_plugins.py@0.2.0"
},
"origin": {
"remote": "git@github.com:zhongweili/42plugin-data.git",
"branch": "master",
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
},
"manifest": {
"name": "jeremy-genkit-terraform",
"description": "Terraform modules for Firebase Genkit infrastructure and deployments",
"version": "1.0.0"
},
"content": {
"files": [
{
"path": "README.md",
"sha256": "702771cbad20ccc3c0926d38ca1eed1eb129655900fe2d2d80dc5d010cfb6943"
},
{
"path": ".claude-plugin/plugin.json",
"sha256": "49c78767e0a11328faf9053e10c764fb13cd341ab7dbcbb363e6039e2e73137e"
},
{
"path": "skills/genkit-infra-expert/SKILL.md",
"sha256": "72da631e2765d0984c7d7c591ee95f43a8aaf00de85dc31dd14c81cfeda714d9"
}
],
"dirSha256": "05d57b6fa2d5d669fdb730d1ecc4f314e37cbdb9f24d81183ef755056ff1c178"
},
"security": {
"scannedAt": null,
"scannerVersion": null,
"flags": []
}
}

View File

@@ -0,0 +1,147 @@
---
name: genkit-infra-expert
description: |
Terraform infrastructure specialist for deploying Genkit applications to production.
Provisions Firebase Functions, Cloud Run services, GKE clusters, monitoring, and CI/CD for Genkit AI workflows.
Triggers: "deploy genkit terraform", "genkit infrastructure", "firebase functions terraform", "cloud run genkit"
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
version: 1.0.0
---
## What This Skill Does
Expert in provisioning production infrastructure for Firebase Genkit applications using Terraform. Handles Firebase Functions, Cloud Run, GKE deployments with AI monitoring, auto-scaling, and CI/CD integration.
## When This Skill Activates
Triggers: "deploy genkit with terraform", "provision genkit infrastructure", "firebase functions terraform", "cloud run deployment terraform", "genkit production infrastructure"
## Core Terraform Modules
### Firebase Functions Deployment
```hcl
resource "google_cloudfunctions2_function" "genkit_function" {
name = "genkit-ai-flow"
location = var.region
build_config {
runtime = "nodejs20"
entry_point = "genkitFlow"
source {
storage_source {
bucket = google_storage_bucket.genkit_source.name
object = google_storage_bucket_object.genkit_code.name
}
}
}
service_config {
max_instance_count = 100
available_memory = "512Mi"
timeout_seconds = 300
environment_variables = {
GOOGLE_API_KEY = var.gemini_api_key
ENABLE_AI_MONITORING = "true"
}
}
}
```
### Cloud Run for Genkit
```hcl
resource "google_cloud_run_v2_service" "genkit_service" {
name = "genkit-api"
location = var.region
template {
scaling {
min_instance_count = 1
max_instance_count = 10
}
containers {
image = "gcr.io/${var.project_id}/genkit-app:latest"
resources {
limits = {
cpu = "2"
memory = "1Gi"
}
}
env {
name = "GOOGLE_API_KEY"
value_source {
secret_key_ref {
secret = google_secret_manager_secret.gemini_key.id
version = "latest"
}
}
}
}
}
traffic {
type = "TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST"
percent = 100
}
}
```
### AI Monitoring Integration
```hcl
resource "google_monitoring_dashboard" "genkit_dashboard" {
dashboard_json = jsonencode({
displayName = "Genkit AI Monitoring"
mosaicLayout = {
columns = 12
tiles = [
{
width = 6
height = 4
widget = {
title = "Token Consumption"
xyChart = {
dataSets = [{
timeSeriesQuery = {
timeSeriesFilter = {
filter = "resource.type=\"cloud_function\" AND metric.type=\"genkit.ai/token_usage\""
}
}
}]
}
}
},
{
width = 6
height = 4
widget = {
title = "Latency"
xyChart = {
dataSets = [{
timeSeriesQuery = {
timeSeriesFilter = {
filter = "resource.type=\"cloud_function\" AND metric.type=\"genkit.ai/latency\""
}
}
}]
}
}
}
]
}
})
}
```
## Tool Permissions
Read, Write, Edit, Grep, Glob, Bash - Full infrastructure provisioning
## References
- Genkit Deployment: https://genkit.dev/docs/deployment
- Firebase Terraform: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloudfunctions2_function