Files
fission-console/examples/big-suite/simple_functions.tf
T

35 lines
1.9 KiB
Terraform
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ──────────────────────────────────────────────────────────────────────────────
# simple_functions.tf — примеры fission_simple_function (добавлено 2026-04-20)
#
# Демонстрирует использование нового составного ресурса, который заменяет
# отдельные fission_environment + fission_package + fission_function + fission_http_trigger
# одним блоком.
#
# Environment simple-<runtime>-env создаётся автоматически при первом apply.
# ──────────────────────────────────────────────────────────────────────────────
# ─── health-check (nodejs, с HTTPTrigger) ────────────────────────────────────
resource "fission_simple_function" "health" {
name = "ecom-health"
runtime = "nodejs"
code_dir = "${path.module}/code/node-health"
url = "/ecom/health"
methods = ["GET"]
}
# ─── metrics (python, без HTTPTrigger) ───────────────────────────────────────
resource "fission_simple_function" "metrics" {
name = "ecom-metrics"
runtime = "python"
code_dir = "${path.module}/code/python-metrics"
}
# ─── go-processor (go, с HTTPTrigger, PUT/POST) ───────────────────────────────
resource "fission_simple_function" "processor" {
name = "ecom-processor"
runtime = "go"
code_dir = "${path.module}/code/go-processor"
url = "/ecom/process"
methods = ["POST", "PUT"]
}