1. Packages
  2. ESXi Native
ESXi Native v1.0.0 published on Monday, Aug 28, 2023 by pulumiverse

ESXi Native

esxi-native logo
ESXi Native v1.0.0 published on Monday, Aug 28, 2023 by pulumiverse

    The ESXi Native provider is used to provision VMs directly on an ESXi hypervisor without a need for vCenter or vSphere.

    Example

    import * as esxi from "@pulumiverse/esxi-native";
    
    
    export = async () => {
        const vm = new esxi.VirtualMachine("vm-test", {
            diskStore: "nvme-ssd-datastore",
            networkInterfaces: [
                {
                    virtualNetwork: "default"
                }
            ]
        });
    
        return {
            "id": vm.id,
            "name": vm.name,
            "os": vm.os,
        };
    }
    
    import pulumi
    from typing import Sequence
    from pulumiverse_esxi_native import VirtualMachine, NetworkInterfaceArgs
    
    vm = VirtualMachine("vm-test",
                        disk_store="nvme-ssd-datastore",
                        network_interfaces=Sequence[NetworkInterfaceArgs(
                            virtual_network="default"
                        )])
    
    pulumi.export("id", vm.id)
    pulumi.export("name", vm.name)
    pulumi.export("os", vm.os)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-esxi-native/sdk/go/esxi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		vm, err := esxi.NewVirtualMachine(ctx, "vm-test", &esxi.VirtualMachineArgs{
    			DiskStore:               pulumi.String("nvme-ssd-datastore"),
    			NetworkInterfaces:       esxi.NetworkInterfaceArray{
    				esxi.NetworkInterfaceArgs{
    					VirtualNetwork: pulumi.String("default"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    
    		ctx.Export("id", vm.ID())
    		ctx.Export("name", vm.Name)
    		ctx.Export("os", vm.Os)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using Pulumi;
    using Pulumiverse.EsxiNative;
    using Pulumiverse.EsxiNative.Inputs;
    
    return await Deployment.RunAsync(() =>
    {
        var vm = new VirtualMachine("vm-test", new VirtualMachineArgs
        {
            DiskStore = "nvme-ssd-datastore",
            NetworkInterfaces = new NetworkInterfaceArgs[]
            {
                new ()
                {
                    VirtualNetwork = "default"
                }
            }
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = vm.Id,
            ["name"] = vm.Name,
            ["os"] = vm.Os,
        };
    });
    
    esxi-native logo
    ESXi Native v1.0.0 published on Monday, Aug 28, 2023 by pulumiverse