docs: full postgres documentation rewrite — sub-field tables, working HCL examples for create/modify/user/database

This commit is contained in:
“Naeel”
2026-07-03 17:02:08 +04:00
parent 1e3038af63
commit 595c9250a1
11 changed files with 412 additions and 117 deletions
@@ -0,0 +1,37 @@
# Resource nubes_postgres_database — Example
Service: `nubes_postgres` (ID: 90)
[PostgreSQL (основной)](postgres.md) | [Operations](postgres_ops.md) | [Database](postgres_database.md) | [Example](postgres_database_example.md)
## Copy-ready manifest (`postgres_database_main.tf`)
```hcl
terraform {
required_providers {
nubes = {
source = "terra.k8c.ru/nubes-test/nubes"
version = "5.0.57"
}
}
}
provider "nubes" {
api_token = "ваш_токен"
api_endpoint = "https://lk-api-gateway-test.ngcloud.ru/api/v1/svc"
}
# Родительский ресурс — nubes_postgres должен быть создан заранее
# resource "nubes_postgres" "baza" { ... }
# Пользователь должен быть создан заранее
# resource "nubes_postgres_user" "myapp" { ... }
resource "nubes_postgres_database" "example" {
postgres_id = nubes_postgres.baza.id
db_name = "myappdb" # только A-Z, a-z, 0-9, без подчёркиваний!
db_owner = nubes_postgres_user.myapp.username
}
```
}
```