Initial commit: Cloud Instances API

Multi-cloud VM instance database with Cloudflare Workers
- Linode, Vultr, AWS connector integration
- D1 database with regions, instances, pricing
- Query API with filtering, caching, pagination
- Cron-based auto-sync (daily + 6-hourly)
- Health monitoring endpoint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
kappa
2026-01-21 20:17:07 +09:00
commit 95043049b4
32 changed files with 10151 additions and 0 deletions

22
wrangler.toml Normal file
View File

@@ -0,0 +1,22 @@
name = "cloud-instances-api"
main = "src/index.ts"
compatibility_date = "2024-12-01"
# D1 Database Binding
[[d1_databases]]
binding = "DB"
database_name = "cloud-instances-db"
database_id = "placeholder-will-be-replaced"
# Environment Variables
[vars]
VAULT_URL = "https://vault.anvil.it.com"
SYNC_BATCH_SIZE = "100"
CACHE_TTL_SECONDS = "300"
# Cron Triggers
[triggers]
crons = [
"0 0 * * *",
"0 */6 * * *"
]