refactor: notes-python — описательные имена файлов/ресурсов + комментарии
Python файлы: - handler.py → sql_runner.py (entrypoint: sql_runner.handle) - handler.py → notes_crud.py (entrypoint: notes_crud.handle) - handler.py → notes_list.py (entrypoint: notes_list.handle) TF ресурсы переименованы: - sless_function.notes → sless_function.notes_crud - sless_trigger.notes_http → sless_trigger.notes_crud_http - sless_job.create_table → sless_job.notes_table_init - sless_job.create_index → sless_job.notes_index_init - archive_file.notes → archive_file.notes_crud_zip - archive_file.sql_runner → archive_file.sql_runner_zip - archive_file.notes_list → archive_file.notes_list_zip Добавлены подробные комментарии во все .tf файлы
This commit is contained in:
@@ -1,12 +1,23 @@
|
||||
# 2025-06-05
|
||||
# outputs.tf — URL эндпоинтов для notes-python примера.
|
||||
# 2026-03-09
|
||||
# outputs.tf — публичные URL развёрнутых функций.
|
||||
#
|
||||
# После terraform apply используй эти URLs для тестирования:
|
||||
# terraform output notes_url → базовый URL для CRUD
|
||||
# terraform output notes_list_url → URL для получения всех записей
|
||||
|
||||
# URL CRUD-функции (notes_crud).
|
||||
# Базовый URL — к нему добавляй sub-path:
|
||||
# POST $(terraform output -raw notes_url)/add?title=Hello&body=World
|
||||
# POST $(terraform output -raw notes_url)/update?id=1&title=Updated
|
||||
# POST $(terraform output -raw notes_url)/delete?id=1
|
||||
output "notes_url" {
|
||||
value = sless_trigger.notes_http.url
|
||||
description = "Базовый URL CRUD: /add?title=...&body=..., /update?id=X&title=...&body=..., /delete?id=X"
|
||||
value = sless_trigger.notes_crud_http.url
|
||||
description = "CRUD: /add?title=...&body=..., /update?id=X&title=...&body=..., /delete?id=X"
|
||||
}
|
||||
|
||||
# URL read-only функции (notes_list).
|
||||
# Принимает GET или POST, параметры игнорирует, возвращает все записи.
|
||||
output "notes_list_url" {
|
||||
value = sless_trigger.notes_list_http.url
|
||||
description = "URL для получения всех записей (GET или POST)"
|
||||
description = "Список всех записей (GET или POST)"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user