Files
tf_provider/TEST_STAND/CRUD/apps/flask.tf
T
Repinoid 03b368a55a test_stand/crud(apps): новые имена ресурсов + SERVICE_NAME для колонки created_by
- locals.tf: crud-flask → flask-crud, crud-lucee → lucee-crud, crud-nodejs → nodejs-crud;
- json_env: SERVICE_NAME = flask/lucee/nodejs (без -crud) — это значение пишется
  приложением в колонку created_by таблицы crud_items;
- terraform validate — Success.

Код приложений (DDL created_at/created_by + INSERT + UI) — в репозиториях
tfflaskcrud/tfnodejscrud/tfluceecrud (origin переключён на terraform/*):
e5fce97, 23338cb, ffcd0c0.
2026-10-01 18:37:44 +03:00

45 lines
1.3 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.
# =============================================================================
# Flask — Python-приложение (CRUD, та же БД и таблица, что у Lucee/Node.js)
# =============================================================================
#
# Креды БД приходят из файла apps/creds.json (см. apps/locals.tf).
# =============================================================================
resource "nubes_flask" "appflask" {
resource_name = local.flask_resource_name
adopt_existing_on_create = true
startup_configuration = {
resource_realm = var.realm
}
cluster_configuration = {
cpu = local.flask_cpu
memory = local.flask_memory
replicas = local.flask_replicas
}
access_configuration = {
domain = local.flask_domain
}
app_configuration = {
version = "3.12"
git_path = local.flask_git_path
health_path = "/"
}
json_env = jsonencode({
TABLE_NAME = local.crud_table_name
# SERVICE_NAME — значение колонки created_by («кто добавил строку»).
SERVICE_NAME = "flask"
PGHOST = local.pg_host
PGPORT = local.pg_port
PGUSER = local.pg_user
PGPASSWORD = local.pg_pass
PGDATABASE = local.pg_db
PGSSLMODE = local.pg_ssl
})
}