Files
tf_provider/docs/20_discovery/pgadmin-service.md
T
2026-06-30 15:45:24 +04:00

46 lines
2.0 KiB
Markdown

# PgAdmin Service Discovery
**Date:** 2026-01-28
**Subject:** `pgAdmin` service analysis (ID: 96)
**Source:** `har/pg_admin.har`
## Service Overview
- **Service Name:** PgAdmin
- **Service ID:** 96
- **Purpose:** Web-based administration tool for PostgreSQL.
- **Resource Realm:** Kubernetes (e.g. `k8s-3.ext.nubes.ru`)
## API Analysis
### Operations
- **Create**: `POST /instances` with `serviceId: 96`.
- **Parameters**: `POST /instanceOperationCfsParams`.
### Parameters Map (from HAR)
| Param ID | Label (UI) | Type | Value (Sample) | Terraform Field | Notes |
| :--- | :--- | :--- | :--- | :--- | :--- |
| **164** | Имя домена | String | `pgadmin-2113` | `domain` | Used as display name too. |
| **169** | Платформа | String | `k8s-3.ext.nubes.ru` | `resource_realm` | |
| **165** | Квота ядра (mili) | Int | `200` | `cpu` | Default 200m. |
| **166** | Квота памяти (MB) | Int | `256` | `memory` | Default 256MB. |
| **167** | Размер диска (GB) | Int | `1` | `disk` | Default 1GB. |
| **170** | (None) | Email | `log@log.log` | `email` | Admin user email. |
| **171** | (None) | Password | `pass` | `password` | Admin user password. |
### Dependencies
- No explicit link to a Postgres instance found in **create** parameters.
- It seems the PgAdmin instance is standalone. Servers are likely added manually via UI or via config injection (not visible in this HAR).
## Terraform Resource Status
- **Implemented**: `internal/provider/pgadmin_resource.go`.
- **Resource Name**: `nubes_pgadmin`.
- **Status**: Implements `Create`, but `Read` is dummy (state-only) and `Delete` is skipped (protection).
- **Import**: Not supported (due to dummy Read).
- **Anomalies**:
- Fields `organization_id` and `organization_name` are required in schema but unused in API calls. Likely technical debt or metadata.
## User Actions Required
To use this resource:
1. Define `nubes_pgadmin` resource.
2. Provide dummy values for `organization_*` fields.
3. Set `resource_realm` to match your K8s cluster.