sless-examples/notes-python/main.tf
2026-03-09 17:57:29 +04:00

28 lines
1.1 KiB
HCL
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.

# 2026-03-09
# main.tf — конфигурация terraform и провайдеров.
#
# Все ресурсы вынесены в отдельные .tf файлы по назначению:
# variables.tf — входные переменные (pg_dsn)
# sql-runner.tf — служебная DDL-функция (без HTTP-триггера)
# init.tf — однократная инициализация схемы БД
# notes.tf — CRUD функция + HTTP-триггер
# notes-list.tf — read-only функция + HTTP-триггер
# outputs.tf — URLs развёрнутых эндпоинтов
terraform {
required_providers {
# Провайдер для управления serverless функциями через sless API
sless = {
source = "terra.k8c.ru/naeel/sless"
version = "~> 0.1.10"
}
}
}
# sless провайдер подключается к API кластера.
# В продакшне token следует передавать через TF_VAR или secrets.
provider "sless" {
endpoint = "https://sless-api.kube5s.ru"
token = "dev-token-change-me"
}