GetVmfsDisks

The vsphere..getVmfsDisks data source can be used to discover the storage devices available on an ESXi host. This data source can be combined with the vsphere..VmfsDatastore resource to create VMFS datastores based off a set of discovered disks.

Example Usage

using Pulumi;
using VSphere = Pulumi.VSphere;

class MyStack : Stack
{
    public MyStack()
    {
        var datacenter = Output.Create(VSphere.GetDatacenter.InvokeAsync(new VSphere.GetDatacenterArgs
        {
            Name = "dc1",
        }));
        var host = datacenter.Apply(datacenter => Output.Create(VSphere.GetHost.InvokeAsync(new VSphere.GetHostArgs
        {
            DatacenterId = datacenter.Id,
            Name = "esxi1",
        })));
        var available = host.Apply(host => Output.Create(VSphere.GetVmfsDisks.InvokeAsync(new VSphere.GetVmfsDisksArgs
        {
            Filter = "mpx.vmhba1:C0:T[12]:L0",
            HostSystemId = host.Id,
            Rescan = true,
        })));
    }

}

Coming soon!

import pulumi
import pulumi_vsphere as vsphere

datacenter = vsphere.get_datacenter(name="dc1")
host = vsphere.get_host(datacenter_id=datacenter.id,
    name="esxi1")
available = vsphere.get_vmfs_disks(filter="mpx.vmhba1:C0:T[12]:L0",
    host_system_id=host.id,
    rescan=True)
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";

const datacenter = pulumi.output(vsphere.getDatacenter({
    name: "dc1",
}, { async: true }));
const host = datacenter.apply(datacenter => vsphere.getHost({
    datacenterId: datacenter.id,
    name: "esxi1",
}, { async: true }));
const available = host.apply(host => vsphere.getVmfsDisks({
    filter: "mpx.vmhba1:C0:T[12]:L0",
    hostSystemId: host.id,
    rescan: true,
}, { async: true }));

Using GetVmfsDisks

function getVmfsDisks(args: GetVmfsDisksArgs, opts?: InvokeOptions): Promise<GetVmfsDisksResult>
function  get_vmfs_disks(filter=None, host_system_id=None, rescan=None, opts=None)
func GetVmfsDisks(ctx *Context, args *GetVmfsDisksArgs, opts ...InvokeOption) (*GetVmfsDisksResult, error)
public static class GetVmfsDisks {
    public static Task<GetVmfsDisksResult> InvokeAsync(GetVmfsDisksArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

HostSystemId string

The managed object ID of the host to look for disks on.

Filter string

A regular expression to filter the disks against. Only disks with canonical names that match will be included.

Rescan bool

Whether or not to rescan storage adapters before searching for disks. This may lengthen the time it takes to perform the search. Default: false.

HostSystemId string

The managed object ID of the host to look for disks on.

Filter string

A regular expression to filter the disks against. Only disks with canonical names that match will be included.

Rescan bool

Whether or not to rescan storage adapters before searching for disks. This may lengthen the time it takes to perform the search. Default: false.

hostSystemId string

The managed object ID of the host to look for disks on.

filter string

A regular expression to filter the disks against. Only disks with canonical names that match will be included.

rescan boolean

Whether or not to rescan storage adapters before searching for disks. This may lengthen the time it takes to perform the search. Default: false.

host_system_id str

The managed object ID of the host to look for disks on.

filter str

A regular expression to filter the disks against. Only disks with canonical names that match will be included.

rescan bool

Whether or not to rescan storage adapters before searching for disks. This may lengthen the time it takes to perform the search. Default: false.

GetVmfsDisks Result

The following output properties are available:

Disks List<string>

A lexicographically sorted list of devices discovered by the operation, matching the supplied filter, if provided.

HostSystemId string
Id string

The provider-assigned unique ID for this managed resource.

Filter string
Rescan bool
Disks []string

A lexicographically sorted list of devices discovered by the operation, matching the supplied filter, if provided.

HostSystemId string
Id string

The provider-assigned unique ID for this managed resource.

Filter string
Rescan bool
disks string[]

A lexicographically sorted list of devices discovered by the operation, matching the supplied filter, if provided.

hostSystemId string
id string

The provider-assigned unique ID for this managed resource.

filter string
rescan boolean
disks List[str]

A lexicographically sorted list of devices discovered by the operation, matching the supplied filter, if provided.

host_system_id str
id str

The provider-assigned unique ID for this managed resource.

filter str
rescan bool

Package Details

Repository
https://github.com/pulumi/pulumi-vsphere
License
Apache-2.0
Notes
This Pulumi package is based on the vsphere Terraform Provider.