Crossplane Provider for VMware vSphere Virtual Machines, built with Upjet from terraform-provider-vsphere (v2.16.1).
| Kind | API Group | Terraform Resource | Scope |
|---|---|---|---|
VirtualMachine |
virtualmachine.vspherevm.stuttgart-things.com |
vsphere_virtual_machine |
Cluster + Namespaced |
MachineSnapshot |
virtual.vspherevm.stuttgart-things.com |
vsphere_virtual_machine_snapshot |
Cluster + Namespaced |
MachineClass |
virtual.vspherevm.stuttgart-things.com |
vsphere_virtual_machine_class |
Cluster + Namespaced |
Namespaced variants use *.vspherevm.m.stuttgart-things.com API groups.
# Install latest
kubectl apply -f https://raw.githubusercontent.com/stuttgart-things/provider-vspherevm/main/examples/install.yaml
# Or apply manually with a specific version
kubectl apply -f - <<'EOF'
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: provider-vspherevm
spec:
package: ghcr.io/stuttgart-things/provider-vspherevm-xpkg:latest
EOFPinned version: See examples/install.yaml for the latest tested release version.
Create a Secret with vSphere credentials:
kubectl create secret generic vsphere-creds -n crossplane-system \
--from-literal=credentials='{"user":"administrator@vsphere.local","password":"...","server":"vcenter.example.com","allow_unverified_ssl":"true"}'Apply a ProviderConfig:
apiVersion: vspherevm.stuttgart-things.com/v1beta1
kind: ProviderConfig
metadata:
name: default
spec:
credentials:
source: Secret
secretRef:
name: vsphere-creds
namespace: crossplane-system
key: credentialsapiVersion: virtualmachine.vspherevm.stuttgart-things.com/v1alpha1
kind: VirtualMachine
metadata:
name: my-vm
spec:
forProvider:
name: my-crossplane-vm
resourcePoolId: "${RESOURCE_POOL_ID}"
datastoreId: "${DATASTORE_ID}"
numCpus: 2
memory: 4096
guestId: ubuntu64Guest
networkInterface:
- networkId: "${NETWORK_ID}"
disk:
- size: 40
thinProvisioned: true
providerConfigRef:
name: default- Overview -- features, architecture, credential mapping
- Development -- code generation, prerequisites, gotchas
- Deployment -- container image, xpkg, local dev
- CI/CD -- GitHub Actions workflows, semantic-release
- Testing -- Kind cluster, e2e tests
Run code generation:
go run cmd/generator/main.go "$PWD"Build:
go build ./...Open an issue.