feat: big-suite terraform example + provider nodejs zip fix
- examples/big-suite: E-Commerce 10 functions, 6 layers, real depends_on - provider: nodejs packages now wrapped in ESM zip (buildJSDeployZip) - provider: loadPackageLiteral reads raw file, nodejs zip via source_dir - all 10 functions verified working: python/node/ruby/go runtimes
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
# ──────────────────────────────────────────────────────────────────────────────
|
||||
# Core layer: auth-check (python) + rate-limiter (node)
|
||||
# Деплоятся ПАРАЛЛЕЛЬНО — нет зависимостей друг от друга.
|
||||
# Все сервисные функции depends_on этих триггеров.
|
||||
# ──────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
# ─── auth-check ───────────────────────────────────────────────────────────────
|
||||
|
||||
resource "fission_package" "auth_check" {
|
||||
name = "ecom-auth-check-pkg"
|
||||
environment = fission_environment.python.name
|
||||
source_dir = "${path.module}/code/python-auth"
|
||||
}
|
||||
|
||||
resource "fission_function" "auth_check" {
|
||||
name = "ecom-auth-check"
|
||||
environment = fission_environment.python.name
|
||||
package_name = fission_package.auth_check.name
|
||||
entrypoint = "main.main"
|
||||
}
|
||||
|
||||
resource "fission_http_trigger" "auth_check" {
|
||||
name = "ecom-auth-check-route"
|
||||
function = fission_function.auth_check.name
|
||||
url = "/ecom/auth/check"
|
||||
methods = ["GET", "POST"]
|
||||
}
|
||||
|
||||
# ─── rate-limiter ─────────────────────────────────────────────────────────────
|
||||
|
||||
resource "fission_package" "rate_limiter" {
|
||||
name = "ecom-rate-limiter-pkg"
|
||||
environment = fission_environment.node.name
|
||||
source_dir = "${path.module}/code/node-ratelimiter"
|
||||
}
|
||||
|
||||
resource "fission_function" "rate_limiter" {
|
||||
name = "ecom-rate-limiter"
|
||||
environment = fission_environment.node.name
|
||||
package_name = fission_package.rate_limiter.name
|
||||
entrypoint = "main"
|
||||
}
|
||||
|
||||
resource "fission_http_trigger" "rate_limiter" {
|
||||
name = "ecom-rate-limiter-route"
|
||||
function = fission_function.rate_limiter.name
|
||||
url = "/ecom/rate/check"
|
||||
methods = ["GET", "POST"]
|
||||
}
|
||||
Reference in New Issue
Block a user