sless-primer/notes-python/terraform.tfstate.1773036482.backup
“Naeel” 49035d35f0 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 файлы
2026-03-09 10:10:43 +04:00

366 lines
12 KiB
Plaintext

{
"version": 4,
"terraform_version": "1.12.2",
"serial": 16,
"lineage": "46b43916-6d6b-060c-ad36-6176e18b5f7b",
"outputs": {
"notes_list_url": {
"value": "https://sless-api.kube5s.ru/fn/default/notes-list",
"type": "string"
},
"notes_url": {
"value": "https://sless-api.kube5s.ru/fn/default/notes",
"type": "string"
}
},
"resources": [
{
"mode": "data",
"type": "archive_file",
"name": "notes",
"provider": "provider[\"registry.terraform.io/hashicorp/archive\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"exclude_symlink_directories": null,
"excludes": null,
"id": "d1fed6f90a4b4fde556aa2cd18e6ffaa9877c377",
"output_base64sha256": "HMlgBvSu0gccGVilru2ybzC7v31uzG1Zy96bK4p+C1E=",
"output_base64sha512": "GoV68HbQgbVaBtR4v1kLUhh+kMpJRIoBz30SrgYlVGz13SzV1wZ/lPvedqYvhmirG0fQf63wHYThOmvOR7lvgQ==",
"output_file_mode": null,
"output_md5": "cf96673e4f09c58d2e49c1664cdee1c2",
"output_path": "./dist/notes.zip",
"output_sha": "d1fed6f90a4b4fde556aa2cd18e6ffaa9877c377",
"output_sha256": "1cc96006f4aed2071c1958a5aeedb26f30bbbf7d6ecc6d59cbde9b2b8a7e0b51",
"output_sha512": "1a857af076d081b55a06d478bf590b52187e90ca49448a01cf7d12ae0625546cf5dd2cd5d7067f94fbde76a62f8668ab1b47d07fadf01d84e13a6bce47b96f81",
"output_size": 1226,
"source": [],
"source_content": null,
"source_content_filename": null,
"source_dir": "./code/notes",
"source_file": null,
"type": "zip"
},
"sensitive_attributes": [],
"identity_schema_version": 0
}
]
},
{
"mode": "data",
"type": "archive_file",
"name": "notes_list",
"provider": "provider[\"registry.terraform.io/hashicorp/archive\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"exclude_symlink_directories": null,
"excludes": null,
"id": "b5730a0d98ae778f80c27881147e14d060151fce",
"output_base64sha256": "1pbtfCE8qjpAP5Ddz9c9afhOUXq3aq56ordi5t4vX00=",
"output_base64sha512": "nTUnbRKT4d5g5g3HANTGxZi5FmUIaM3C660XzZmGQLJIQ+WNYNLJ/no/H30KzafwE1mJf2qkdcZ8cT3xZdciNg==",
"output_file_mode": null,
"output_md5": "090088f39e1ef9d8d7d152944441edb7",
"output_path": "./dist/notes-list.zip",
"output_sha": "b5730a0d98ae778f80c27881147e14d060151fce",
"output_sha256": "d696ed7c213caa3a403f90ddcfd73d69f84e517ab76aae7aa2b762e6de2f5f4d",
"output_sha512": "9d35276d1293e1de60e60dc700d4c6c598b916650868cdc2ebad17cd998640b24843e58d60d2c9fe7a3f1f7d0acda7f01359897f6aa475c67c713df165d72236",
"output_size": 746,
"source": [],
"source_content": null,
"source_content_filename": null,
"source_dir": "./code/notes-list",
"source_file": null,
"type": "zip"
},
"sensitive_attributes": [],
"identity_schema_version": 0
}
]
},
{
"mode": "data",
"type": "archive_file",
"name": "sql_runner",
"provider": "provider[\"registry.terraform.io/hashicorp/archive\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"exclude_symlink_directories": null,
"excludes": null,
"id": "241f12b31b5d970c697341292954b220e44f8d2a",
"output_base64sha256": "w/IUipIki9V1lf33x06/gHq+KWVdfJO9Ni98DkhC+Xw=",
"output_base64sha512": "aLpBXApQ5Nltm6ODUqQc6VZQCoxgn68mHlcrOF8bFrdem8psnz7dujkJE5PYvB5VDNKmdsViDAKPNTwHxut4XA==",
"output_file_mode": null,
"output_md5": "1fe2ab7afe4730b1141146363d69bd23",
"output_path": "./dist/sql-runner.zip",
"output_sha": "241f12b31b5d970c697341292954b220e44f8d2a",
"output_sha256": "c3f2148a92248bd57595fdf7c74ebf807abe29655d7c93bd362f7c0e4842f97c",
"output_sha512": "68ba415c0a50e4d96d9ba38352a41ce956500a8c609faf261e572b385f1b16b75e9bca6c9f3eddba39091393d8bc1e550cd2a676c5620c028f353c07c6eb785c",
"output_size": 796,
"source": [],
"source_content": null,
"source_content_filename": null,
"source_dir": "./code/sql-runner",
"source_file": null,
"type": "zip"
},
"sensitive_attributes": [],
"identity_schema_version": 0
}
]
},
{
"mode": "managed",
"type": "sless_function",
"name": "notes_crud",
"provider": "provider[\"terra.k8c.ru/naeel/sless\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"build_timeout_sec": 300,
"code_hash": "aaefd6de16697af6ac7331c7e1795a5446c71e351e6cacc3f4b490b683feb0cb",
"code_path": "./dist/notes.zip",
"entrypoint": "handler.handle",
"env_vars": {
"PG_DSN": "postgres://sless:sless-pg-password@postgres.sless.svc.cluster.local:5432/sless?sslmode=disable"
},
"image_ref": "naeel/sless-default-notes:80b15a8b73f5",
"memory_mb": 128,
"name": "notes",
"namespace": "default",
"phase": "Ready",
"runtime": "python3.11",
"timeout_sec": 30
},
"sensitive_attributes": [
[
{
"type": "get_attr",
"value": "env_vars"
},
{
"type": "index",
"value": {
"value": "PG_DSN",
"type": "string"
}
}
]
],
"identity_schema_version": 0,
"dependencies": [
"data.archive_file.notes"
]
}
]
},
{
"mode": "managed",
"type": "sless_function",
"name": "notes_list",
"provider": "provider[\"terra.k8c.ru/naeel/sless\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"build_timeout_sec": 300,
"code_hash": "4091f7c79ca8c9c5663c812eb08f25ef5257af217bf2b412add670a4737b9d7f",
"code_path": "./dist/notes-list.zip",
"entrypoint": "handler.handle",
"env_vars": {
"PG_DSN": "postgres://sless:sless-pg-password@postgres.sless.svc.cluster.local:5432/sless?sslmode=disable"
},
"image_ref": "naeel/sless-default-notes-list:07f2d5ae5ee4",
"memory_mb": 128,
"name": "notes-list",
"namespace": "default",
"phase": "Ready",
"runtime": "python3.11",
"timeout_sec": 30
},
"sensitive_attributes": [
[
{
"type": "get_attr",
"value": "env_vars"
},
{
"type": "index",
"value": {
"value": "PG_DSN",
"type": "string"
}
}
]
],
"identity_schema_version": 0,
"dependencies": [
"data.archive_file.notes_list"
]
}
]
},
{
"mode": "managed",
"type": "sless_function",
"name": "sql_runner",
"provider": "provider[\"terra.k8c.ru/naeel/sless\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"build_timeout_sec": 300,
"code_hash": "fcde93e59e6fd7f3db426482da7667d5d402aaaaaf56f79a7a60bb1722ec603a",
"code_path": "./dist/sql-runner.zip",
"entrypoint": "handler.handle",
"env_vars": {
"PG_DSN": "postgres://sless:sless-pg-password@postgres.sless.svc.cluster.local:5432/sless?sslmode=disable"
},
"image_ref": "naeel/sless-default-sql-runner:22bce581a299",
"memory_mb": 128,
"name": "sql-runner",
"namespace": "default",
"phase": "Ready",
"runtime": "python3.11",
"timeout_sec": 30
},
"sensitive_attributes": [
[
{
"type": "get_attr",
"value": "env_vars"
},
{
"type": "index",
"value": {
"value": "PG_DSN",
"type": "string"
}
}
]
],
"identity_schema_version": 0,
"dependencies": [
"data.archive_file.sql_runner"
]
}
]
},
{
"mode": "managed",
"type": "sless_job",
"name": "create_index",
"provider": "provider[\"terra.k8c.ru/naeel/sless\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"completion_time": "2026-03-09T05:44:59Z",
"event_json": "{\"statements\":[\"CREATE INDEX IF NOT EXISTS notes_created_idx ON notes(created_at DESC)\"]}",
"function": "sql-runner",
"message": "completed successfully",
"name": "notes-create-index",
"namespace": "default",
"phase": "Succeeded",
"run_id": 1,
"start_time": "2026-03-09T05:44:54Z",
"wait_timeout_sec": 60
},
"sensitive_attributes": [],
"identity_schema_version": 0,
"dependencies": [
"data.archive_file.sql_runner",
"sless_function.sql_runner",
"sless_job.create_table"
]
}
]
},
{
"mode": "managed",
"type": "sless_job",
"name": "create_table",
"provider": "provider[\"terra.k8c.ru/naeel/sless\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"completion_time": "2026-03-09T05:44:54Z",
"event_json": "{\"statements\":[\"CREATE TABLE IF NOT EXISTS notes (id serial PRIMARY KEY, title text NOT NULL, body text, created_at timestamp DEFAULT now())\"]}",
"function": "sql-runner",
"message": "completed successfully",
"name": "notes-create-table",
"namespace": "default",
"phase": "Succeeded",
"run_id": 1,
"start_time": "2026-03-09T05:44:39Z",
"wait_timeout_sec": 120
},
"sensitive_attributes": [],
"identity_schema_version": 0,
"dependencies": [
"data.archive_file.sql_runner",
"sless_function.sql_runner"
]
}
]
},
{
"mode": "managed",
"type": "sless_trigger",
"name": "notes_http",
"provider": "provider[\"terra.k8c.ru/naeel/sless\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"active": true,
"enabled": true,
"function": "notes",
"name": "notes-http",
"namespace": "default",
"schedule": null,
"type": "http",
"url": "https://sless-api.kube5s.ru/fn/default/notes"
},
"sensitive_attributes": [],
"identity_schema_version": 0
}
]
},
{
"mode": "managed",
"type": "sless_trigger",
"name": "notes_list_http",
"provider": "provider[\"terra.k8c.ru/naeel/sless\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"active": true,
"enabled": true,
"function": "notes-list",
"name": "notes-list-http",
"namespace": "default",
"schedule": null,
"type": "http",
"url": "https://sless-api.kube5s.ru/fn/default/notes-list"
},
"sensitive_attributes": [],
"identity_schema_version": 0,
"dependencies": [
"data.archive_file.notes_list",
"sless_function.notes_list"
]
}
]
}
],
"check_results": null
}