Files
vmware-api-simulator/docs/examples/terraform.md
T
inecs f8d3cbdd59 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.
2026-07-18 04:42:11 +03:00

1.5 KiB

Language / Язык: English | Русский

Terraform

examples/terraform/vsphere/ uses the official hashicorp/vsphere provider (SOAP /sdk under the hood) pointed at the local HTTPS gateway (https://localhost) with allow_unverified_ssl = true for the development certificate.

cd examples/terraform/vsphere
terraform init
TF_VAR_create_lab_vm=false terraform plan   # data sources only (datacenter/cluster/datastore/network/VM)
TF_VAR_create_lab_vm=true terraform apply   # also creates a lab VM (SOAP CreateVM_Task)

Defaults (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" (a small/large seeded VM).

Provider plugin versions move quickly — pin versions in a required_providers block to what you have tested. After make seed, refresh or recreate state so VM name/MOID assumptions stay aligned.

This cookbook is a starting point for lab CI, not a certification of every hashicorp/vsphere resource/data source against the full route registry. See SOAP / VIM for the exact operations backing the provider's create/read paths, and pulumi-tests/ for the pulumi-vsphere lab suite (make pulumi-tests).