Initial commit: VMware vSphere API simulator scaffold.

Add the FastAPI app, PostgreSQL migrations, Docker/Helm packaging, API
contracts, docs, client examples, and the unit/integration/compatibility
test suite for local client and tooling labs without a real vCenter.
This commit is contained in:
2026-07-18 04:42:11 +03:00
commit f8d3cbdd59
422 changed files with 361335 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
**Language / Язык:** [English](../../examples/terraform.md) | [Русский](terraform.md)
# Terraform
[`examples/terraform/vsphere/`](../../../examples/terraform/vsphere/) использует
официальный провайдер `hashicorp/vsphere` (SOAP `/sdk` под капотом), направленный
на локальный HTTPS-шлюз (`https://localhost`) с
`allow_unverified_ssl = true` для разработческого сертификата.
```bash
cd examples/terraform/vsphere
terraform init
TF_VAR_create_lab_vm=false terraform plan # только data sources (datacenter/cluster/datastore/network/VM)
TF_VAR_create_lab_vm=true terraform apply # также создаёт лабораторную ВМ (SOAP CreateVM_Task)
```
Значения по умолчанию (`variables.tf`): `vsphere_server = "localhost"`,
`vsphere_user = "administrator@vsphere.local"`,
`vsphere_password = "VMware1!"`, `datacenter = "Datacenter"`,
`cluster = "Cluster"`, `datastore = "datastore1"`,
`network = "VM Network"`, `vm_name = "web-01"` (ВМ из seed `small`/`large`).
Версии плагинов провайдера меняются быстро — закрепите версии в блоке
`required_providers` под то, что вы протестировали. После `make seed` обновите
или пересоздайте state, чтобы допущения об именах ВМ/MOID оставались согласованными.
Этот cookbook — отправная точка для лабораторного CI, а не сертификация каждого
resource/data source `hashicorp/vsphere` против полного реестра маршрутов. См.
[SOAP / VIM](../domains/soap.md) для точных операций, лежащих в основе create/read
путей провайдера, и
[`pulumi-tests/`](../../../pulumi-tests/README.ru.md) для lab-набора
`pulumi-vsphere` (`make pulumi-tests`).