Terraform Hyper-V Provider: Automate VMs & Switches
Use the Terraform Hyper-V provider to provision VMs, virtual switches, and manage Windows Server infrastructure with code.
DevOps
Automate Nutanix AHV with Terraform: nutanix/nutanix provider, VM provisioning, categories, and Prism Central infrastructure as code.
Nutanix AHV is the KVM-derived hypervisor that ships with Nutanix HCI. The official nutanix/nutanix Terraform provider drives Prism Central — VMs, categories, projects, images, and self-service blueprints — declaratively.
terraform {
required_providers {
nutanix = {
source = "nutanix/nutanix"
version = "~> 2.0"
}
}
}
provider "nutanix" {
username = var.username
password = var.password
endpoint = var.prism_central_ip
insecure = false
port = 9440
}data "nutanix_cluster" "this" { name = "Acme-PROD" }
data "nutanix_subnet" "this" { subnet_name = "vlan-100" }
data "nutanix_image" "ubuntu" { image_name = "ubuntu-24.04-cloud" }
resource "nutanix_virtual_machine" "web" {
name = "web-1"
cluster_uuid = data.nutanix_cluster.this.metadata.uuid
num_vcpus_per_socket = 2
num_sockets = 1
memory_size_mib = 4096
disk_list {
data_source_reference = {
kind = "image"
uuid = data.nutanix_image.ubuntu.id
}
}
nic_list {
subnet_uuid = data.nutanix_subnet.this.metadata.uuid
}
guest_customization_cloud_init_user_data = base64encode(<<-EOT
#cloud-config
hostname: web-1
users:
- name: ubuntu
ssh_authorized_keys:
- ${chomp(file("~/.ssh/id_ed25519.pub"))}
EOT
)
}resource "nutanix_category_key" "env" {
name = "Environment"
description = "Deployment environment"
}
resource "nutanix_category_value" "prod" {
name = nutanix_category_key.env.name
value = "Production"
}The official nutanix/nutanix provider drives Prism Central: virtual machines, images, subnets, categories, projects, access-control policies, and self-service blueprints. It turns the entire Nutanix HCI control plane into declarative infrastructure as code.
Point it at Prism Central (port 9440). Prism Central is the multi-cluster control plane where VMs, categories, and projects live; the provider's v2 resources are built around its v3/v4 APIs rather than the per-cluster Prism Element.
Set guest_customization_cloud_init_user_data on nutanix_virtual_machine to a base64-encoded #cloud-config document. AHV injects it on first boot — use it for hostname, users, SSH keys, and packages instead of remote-exec.
Categories are key/value tags (nutanix_category_key + nutanix_category_value) that drive policy in Flow microsegmentation and Calm. Model them in Terraform and attach them to VMs so security and automation policies apply consistently across the fleet.
Use the Terraform Hyper-V provider to provision VMs, virtual switches, and manage Windows Server infrastructure with code.
Terraform for Proxmox VE with the bpg/proxmox provider: API token auth, cloud-init VMs, and LXC containers via proxmox_virtual_environment_container.
Provision VMs on VMware ESXi and vCenter with Terraform: vsphere provider, templates, cloud-init, networking, and resource pools.
Automate Xen and XCP-ng pools with Terraform: xenorchestra provider, VM provisioning, SR storage, and Citrix Hypervisor lab automation.