refactor: restructure project — separate tools, config, generated, provider

TOOLS/        — generators + scripts + config + ARCHITECTURE.md
  ├── yaml-generator/    (code)
  ├── resource-generator/ (code)
  ├── docs-generator/    (code)
  ├── scripts/           (← devops/*.sh)
  ├── config/            (← devops/profiles/ + devops/config/)
  │   ├── test/          profile.env, services_list.txt, operation_timeouts.json
  │   ├── prod/
  │   └── dev/
  └── ARCHITECTURE.md    (← devops/ARCHITECTURE.md)

generated/    — pipeline output only (gitignored)
  ├── test/resources_yaml/, go/, docs/, provider_build/
  ├── prod/
  └── dev/

provider/     — code only, no generated files
  resources_yaml/        — DELETED (generated)
  internal/resources_gen/ — DELETED (generated)

devops/       — removed (replaced by TOOLS/scripts + TOOLS/config + generated/)

Generators now fail if NUBES_*_DIR not set (no defaults to provider/).
Provider requires pipeline to populate resources_gen/ before build.
This commit is contained in:
“Naeel”
2026-07-06 09:06:09 +04:00
parent c34db5e5e3
commit dd56bcda83
1285 changed files with 84004 additions and 1910 deletions
@@ -0,0 +1,41 @@
# Resource nubes_vc_vdc
Service ID: `21`
Service Name: Виртуальный датацентр (vDC)
[Manual](vc_vdc.md) | [Create params](vc_vdc_params_create.md) | [Modify params](vc_vdc_params_modify.md) | [Output params](vc_vdc_outputs.md) | [Operations](vc_vdc_ops.md) | [Example](vc_vdc_example.md)
## Create params
**Обязательные параметры (вводимые пользователем)**
<table class="resource-table resource-table-compact resource-table-required">
<thead><tr><th>ID</th><th>Code</th><th>Type</th><th>Description</th><th>Constraints</th></tr></thead>
<tbody>
<tr><td>30</td><td><strong><code class="code-no-wrap">organization_uid</code></strong></td><td><code>uuid</code></td><td>Для создания VDC предварительно необходимо создать организацию через услугу `Организация в Cloud Director`</td><td>ref_svc_id=19</td></tr>
<tr><td>335</td><td><strong><code class="code-no-wrap">provider_vdc</code></strong></td><td><code>string</code></td><td>Приписка `2.8` - Скорость vCPU - 2800MHz<br/>И так далее...<br/></td><td></td></tr>
<tr><td>746</td><td><strong><code class="code-no-wrap">network_provider</code></strong></td><td><code>string</code></td><td></td><td></td></tr>
</tbody></table>
**Параметры, имеющие значение по умолчанию, если не меняете - эти параметры не обязательно прописывать в манифесте**
<table class="resource-table resource-table-compact">
<thead><tr><th>ID</th><th>Code</th><th>Type</th><th>Default</th><th>Description</th><th>Constraints</th></tr></thead>
<tbody>
<tr><td>361</td><td><strong><code class="code-no-wrap">storage_config</code></strong></td><td><code>array-map-fixed</code></td><td><code>[{}]</code></td><td>Первая политика в списке указывается как &amp;quot;По умолчанию&amp;quot;</td><td></td></tr>
<tr><td>397</td><td><strong><code class="code-no-wrap">cpu_guaranteed</code></strong></td><td><code>integer</code></td><td><code>20</code></td><td>Свойство нельзя изменить после создания</td><td>value_list=20, 50, 80</td></tr>
<tr><td>557</td><td><strong><code class="code-no-wrap">cpu_allocated</code></strong></td><td><code>integer</code></td><td><code>80</code></td><td>шт</td><td>minvalue=1; maxvalue=1000</td></tr>
<tr><td>558</td><td><strong><code class="code-no-wrap">mem_allocated</code></strong></td><td><code>integer</code></td><td><code>200</code></td><td>gb</td><td>minvalue=1; maxvalue=4096</td></tr>
</tbody></table>
<div class="lifecycle-note">
<strong>Параметры поведения (кратко)</strong><br/>
По умолчанию: `suspend_on_destroy = True`, `adopt_existing_on_create = False`.<br/>
При `terraform destroy` или удалении ресурса из манифеста:<br/>
- `suspend_on_destroy=true` — инстанс переводится в `Suspend` (не удаляется).<br/>
- `suspend_on_destroy=false` — Terraform удаляет ресурс только из state.<br/>
При `apply` флаг `adopt_existing_on_create` работает как авто-`import`:<br/>
- `false` — если ресурс уже есть, будет ошибка.<br/>
- `true` — Terraform может взять существующий инстанс под управление (`running` → adopt, `suspended` → resume+adopt при совпадении параметров).<br/>
Важно: один инстанс должен быть только в одном state. Иначе получите конфликт управления.
</div>