# 2026-03-11 # job.tf — одноразовый запуск Go функции с event payload. resource "sless_function" "hello_go_job" { name = "hello-go-job" runtime = "go1.23" entrypoint = "handler.Handle" memory_mb = 128 timeout_sec = 60 source_dir = "${path.module}/code" } resource "sless_job" "hello_go_run" { name = "hello-go-run" function = sless_function.hello_go_job.name event_json = jsonencode({ name = "Go" }) wait_timeout_sec = 300 run_id = 1 } output "job_phase" { value = sless_job.hello_go_run.phase } output "job_message" { value = sless_job.hello_go_run.message }