vsphere.VirtualDisk
Explore with Pulumi AI
Create VirtualDisk Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VirtualDisk(name: string, args: VirtualDiskArgs, opts?: CustomResourceOptions);
@overload
def VirtualDisk(resource_name: str,
args: VirtualDiskArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VirtualDisk(resource_name: str,
opts: Optional[ResourceOptions] = None,
datastore: Optional[str] = None,
size: Optional[int] = None,
vmdk_path: Optional[str] = None,
adapter_type: Optional[str] = None,
create_directories: Optional[bool] = None,
datacenter: Optional[str] = None,
type: Optional[str] = None)
func NewVirtualDisk(ctx *Context, name string, args VirtualDiskArgs, opts ...ResourceOption) (*VirtualDisk, error)
public VirtualDisk(string name, VirtualDiskArgs args, CustomResourceOptions? opts = null)
public VirtualDisk(String name, VirtualDiskArgs args)
public VirtualDisk(String name, VirtualDiskArgs args, CustomResourceOptions options)
type: vsphere:VirtualDisk
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VirtualDiskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VirtualDiskArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VirtualDiskArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VirtualDiskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VirtualDiskArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var virtualDiskResource = new VSphere.VirtualDisk("virtualDiskResource", new()
{
Datastore = "string",
Size = 0,
VmdkPath = "string",
CreateDirectories = false,
Datacenter = "string",
Type = "string",
});
example, err := vsphere.NewVirtualDisk(ctx, "virtualDiskResource", &vsphere.VirtualDiskArgs{
Datastore: pulumi.String("string"),
Size: pulumi.Int(0),
VmdkPath: pulumi.String("string"),
CreateDirectories: pulumi.Bool(false),
Datacenter: pulumi.String("string"),
Type: pulumi.String("string"),
})
var virtualDiskResource = new VirtualDisk("virtualDiskResource", VirtualDiskArgs.builder()
.datastore("string")
.size(0)
.vmdkPath("string")
.createDirectories(false)
.datacenter("string")
.type("string")
.build());
virtual_disk_resource = vsphere.VirtualDisk("virtualDiskResource",
datastore="string",
size=0,
vmdk_path="string",
create_directories=False,
datacenter="string",
type="string")
const virtualDiskResource = new vsphere.VirtualDisk("virtualDiskResource", {
datastore: "string",
size: 0,
vmdkPath: "string",
createDirectories: false,
datacenter: "string",
type: "string",
});
type: vsphere:VirtualDisk
properties:
createDirectories: false
datacenter: string
datastore: string
size: 0
type: string
vmdkPath: string
VirtualDisk Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The VirtualDisk resource accepts the following input properties:
- Datastore string
- The name of the datastore in which to create the disk.
- Size int
- Size of the disk (in GB).
- Vmdk
Path string - The path, including filename, of the virtual disk to
be created. This needs to end in
.vmdk
. - Adapter
Type string The adapter type for this virtual disk. Can be one of
ide
,lsiLogic
, orbusLogic
. Default:lsiLogic
.NOTE:
adapter_type
is deprecated: it does not dictate the type of controller that the virtual disk will be attached to on the virtual machine. Please see thescsi_type
parameter in thevsphere.VirtualMachine
resource for information on how to control disk controller types. This parameter will be removed in future versions of the vSphere provider.- Create
Directories bool Tells the resource to create any directories that are a part of the
vmdk_path
parameter if they are missing. Default:false
.NOTE: Any directory created as part of the operation when
create_directories
is enabled will not be deleted when the resource is destroyed.- Datacenter string
- The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.
- Type string
- The type of disk to create. Can be one of
eagerZeroedThick
,lazy
, orthin
. Default:eagerZeroedThick
. For information on what each kind of disk provisioning policy means, click here.
- Datastore string
- The name of the datastore in which to create the disk.
- Size int
- Size of the disk (in GB).
- Vmdk
Path string - The path, including filename, of the virtual disk to
be created. This needs to end in
.vmdk
. - Adapter
Type string The adapter type for this virtual disk. Can be one of
ide
,lsiLogic
, orbusLogic
. Default:lsiLogic
.NOTE:
adapter_type
is deprecated: it does not dictate the type of controller that the virtual disk will be attached to on the virtual machine. Please see thescsi_type
parameter in thevsphere.VirtualMachine
resource for information on how to control disk controller types. This parameter will be removed in future versions of the vSphere provider.- Create
Directories bool Tells the resource to create any directories that are a part of the
vmdk_path
parameter if they are missing. Default:false
.NOTE: Any directory created as part of the operation when
create_directories
is enabled will not be deleted when the resource is destroyed.- Datacenter string
- The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.
- Type string
- The type of disk to create. Can be one of
eagerZeroedThick
,lazy
, orthin
. Default:eagerZeroedThick
. For information on what each kind of disk provisioning policy means, click here.
- datastore String
- The name of the datastore in which to create the disk.
- size Integer
- Size of the disk (in GB).
- vmdk
Path String - The path, including filename, of the virtual disk to
be created. This needs to end in
.vmdk
. - adapter
Type String The adapter type for this virtual disk. Can be one of
ide
,lsiLogic
, orbusLogic
. Default:lsiLogic
.NOTE:
adapter_type
is deprecated: it does not dictate the type of controller that the virtual disk will be attached to on the virtual machine. Please see thescsi_type
parameter in thevsphere.VirtualMachine
resource for information on how to control disk controller types. This parameter will be removed in future versions of the vSphere provider.- create
Directories Boolean Tells the resource to create any directories that are a part of the
vmdk_path
parameter if they are missing. Default:false
.NOTE: Any directory created as part of the operation when
create_directories
is enabled will not be deleted when the resource is destroyed.- datacenter String
- The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.
- type String
- The type of disk to create. Can be one of
eagerZeroedThick
,lazy
, orthin
. Default:eagerZeroedThick
. For information on what each kind of disk provisioning policy means, click here.
- datastore string
- The name of the datastore in which to create the disk.
- size number
- Size of the disk (in GB).
- vmdk
Path string - The path, including filename, of the virtual disk to
be created. This needs to end in
.vmdk
. - adapter
Type string The adapter type for this virtual disk. Can be one of
ide
,lsiLogic
, orbusLogic
. Default:lsiLogic
.NOTE:
adapter_type
is deprecated: it does not dictate the type of controller that the virtual disk will be attached to on the virtual machine. Please see thescsi_type
parameter in thevsphere.VirtualMachine
resource for information on how to control disk controller types. This parameter will be removed in future versions of the vSphere provider.- create
Directories boolean Tells the resource to create any directories that are a part of the
vmdk_path
parameter if they are missing. Default:false
.NOTE: Any directory created as part of the operation when
create_directories
is enabled will not be deleted when the resource is destroyed.- datacenter string
- The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.
- type string
- The type of disk to create. Can be one of
eagerZeroedThick
,lazy
, orthin
. Default:eagerZeroedThick
. For information on what each kind of disk provisioning policy means, click here.
- datastore str
- The name of the datastore in which to create the disk.
- size int
- Size of the disk (in GB).
- vmdk_
path str - The path, including filename, of the virtual disk to
be created. This needs to end in
.vmdk
. - adapter_
type str The adapter type for this virtual disk. Can be one of
ide
,lsiLogic
, orbusLogic
. Default:lsiLogic
.NOTE:
adapter_type
is deprecated: it does not dictate the type of controller that the virtual disk will be attached to on the virtual machine. Please see thescsi_type
parameter in thevsphere.VirtualMachine
resource for information on how to control disk controller types. This parameter will be removed in future versions of the vSphere provider.- create_
directories bool Tells the resource to create any directories that are a part of the
vmdk_path
parameter if they are missing. Default:false
.NOTE: Any directory created as part of the operation when
create_directories
is enabled will not be deleted when the resource is destroyed.- datacenter str
- The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.
- type str
- The type of disk to create. Can be one of
eagerZeroedThick
,lazy
, orthin
. Default:eagerZeroedThick
. For information on what each kind of disk provisioning policy means, click here.
- datastore String
- The name of the datastore in which to create the disk.
- size Number
- Size of the disk (in GB).
- vmdk
Path String - The path, including filename, of the virtual disk to
be created. This needs to end in
.vmdk
. - adapter
Type String The adapter type for this virtual disk. Can be one of
ide
,lsiLogic
, orbusLogic
. Default:lsiLogic
.NOTE:
adapter_type
is deprecated: it does not dictate the type of controller that the virtual disk will be attached to on the virtual machine. Please see thescsi_type
parameter in thevsphere.VirtualMachine
resource for information on how to control disk controller types. This parameter will be removed in future versions of the vSphere provider.- create
Directories Boolean Tells the resource to create any directories that are a part of the
vmdk_path
parameter if they are missing. Default:false
.NOTE: Any directory created as part of the operation when
create_directories
is enabled will not be deleted when the resource is destroyed.- datacenter String
- The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.
- type String
- The type of disk to create. Can be one of
eagerZeroedThick
,lazy
, orthin
. Default:eagerZeroedThick
. For information on what each kind of disk provisioning policy means, click here.
Outputs
All input properties are implicitly available as output properties. Additionally, the VirtualDisk resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing VirtualDisk Resource
Get an existing VirtualDisk resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: VirtualDiskState, opts?: CustomResourceOptions): VirtualDisk
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
adapter_type: Optional[str] = None,
create_directories: Optional[bool] = None,
datacenter: Optional[str] = None,
datastore: Optional[str] = None,
size: Optional[int] = None,
type: Optional[str] = None,
vmdk_path: Optional[str] = None) -> VirtualDisk
func GetVirtualDisk(ctx *Context, name string, id IDInput, state *VirtualDiskState, opts ...ResourceOption) (*VirtualDisk, error)
public static VirtualDisk Get(string name, Input<string> id, VirtualDiskState? state, CustomResourceOptions? opts = null)
public static VirtualDisk get(String name, Output<String> id, VirtualDiskState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Adapter
Type string The adapter type for this virtual disk. Can be one of
ide
,lsiLogic
, orbusLogic
. Default:lsiLogic
.NOTE:
adapter_type
is deprecated: it does not dictate the type of controller that the virtual disk will be attached to on the virtual machine. Please see thescsi_type
parameter in thevsphere.VirtualMachine
resource for information on how to control disk controller types. This parameter will be removed in future versions of the vSphere provider.- Create
Directories bool Tells the resource to create any directories that are a part of the
vmdk_path
parameter if they are missing. Default:false
.NOTE: Any directory created as part of the operation when
create_directories
is enabled will not be deleted when the resource is destroyed.- Datacenter string
- The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.
- Datastore string
- The name of the datastore in which to create the disk.
- Size int
- Size of the disk (in GB).
- Type string
- The type of disk to create. Can be one of
eagerZeroedThick
,lazy
, orthin
. Default:eagerZeroedThick
. For information on what each kind of disk provisioning policy means, click here. - Vmdk
Path string - The path, including filename, of the virtual disk to
be created. This needs to end in
.vmdk
.
- Adapter
Type string The adapter type for this virtual disk. Can be one of
ide
,lsiLogic
, orbusLogic
. Default:lsiLogic
.NOTE:
adapter_type
is deprecated: it does not dictate the type of controller that the virtual disk will be attached to on the virtual machine. Please see thescsi_type
parameter in thevsphere.VirtualMachine
resource for information on how to control disk controller types. This parameter will be removed in future versions of the vSphere provider.- Create
Directories bool Tells the resource to create any directories that are a part of the
vmdk_path
parameter if they are missing. Default:false
.NOTE: Any directory created as part of the operation when
create_directories
is enabled will not be deleted when the resource is destroyed.- Datacenter string
- The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.
- Datastore string
- The name of the datastore in which to create the disk.
- Size int
- Size of the disk (in GB).
- Type string
- The type of disk to create. Can be one of
eagerZeroedThick
,lazy
, orthin
. Default:eagerZeroedThick
. For information on what each kind of disk provisioning policy means, click here. - Vmdk
Path string - The path, including filename, of the virtual disk to
be created. This needs to end in
.vmdk
.
- adapter
Type String The adapter type for this virtual disk. Can be one of
ide
,lsiLogic
, orbusLogic
. Default:lsiLogic
.NOTE:
adapter_type
is deprecated: it does not dictate the type of controller that the virtual disk will be attached to on the virtual machine. Please see thescsi_type
parameter in thevsphere.VirtualMachine
resource for information on how to control disk controller types. This parameter will be removed in future versions of the vSphere provider.- create
Directories Boolean Tells the resource to create any directories that are a part of the
vmdk_path
parameter if they are missing. Default:false
.NOTE: Any directory created as part of the operation when
create_directories
is enabled will not be deleted when the resource is destroyed.- datacenter String
- The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.
- datastore String
- The name of the datastore in which to create the disk.
- size Integer
- Size of the disk (in GB).
- type String
- The type of disk to create. Can be one of
eagerZeroedThick
,lazy
, orthin
. Default:eagerZeroedThick
. For information on what each kind of disk provisioning policy means, click here. - vmdk
Path String - The path, including filename, of the virtual disk to
be created. This needs to end in
.vmdk
.
- adapter
Type string The adapter type for this virtual disk. Can be one of
ide
,lsiLogic
, orbusLogic
. Default:lsiLogic
.NOTE:
adapter_type
is deprecated: it does not dictate the type of controller that the virtual disk will be attached to on the virtual machine. Please see thescsi_type
parameter in thevsphere.VirtualMachine
resource for information on how to control disk controller types. This parameter will be removed in future versions of the vSphere provider.- create
Directories boolean Tells the resource to create any directories that are a part of the
vmdk_path
parameter if they are missing. Default:false
.NOTE: Any directory created as part of the operation when
create_directories
is enabled will not be deleted when the resource is destroyed.- datacenter string
- The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.
- datastore string
- The name of the datastore in which to create the disk.
- size number
- Size of the disk (in GB).
- type string
- The type of disk to create. Can be one of
eagerZeroedThick
,lazy
, orthin
. Default:eagerZeroedThick
. For information on what each kind of disk provisioning policy means, click here. - vmdk
Path string - The path, including filename, of the virtual disk to
be created. This needs to end in
.vmdk
.
- adapter_
type str The adapter type for this virtual disk. Can be one of
ide
,lsiLogic
, orbusLogic
. Default:lsiLogic
.NOTE:
adapter_type
is deprecated: it does not dictate the type of controller that the virtual disk will be attached to on the virtual machine. Please see thescsi_type
parameter in thevsphere.VirtualMachine
resource for information on how to control disk controller types. This parameter will be removed in future versions of the vSphere provider.- create_
directories bool Tells the resource to create any directories that are a part of the
vmdk_path
parameter if they are missing. Default:false
.NOTE: Any directory created as part of the operation when
create_directories
is enabled will not be deleted when the resource is destroyed.- datacenter str
- The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.
- datastore str
- The name of the datastore in which to create the disk.
- size int
- Size of the disk (in GB).
- type str
- The type of disk to create. Can be one of
eagerZeroedThick
,lazy
, orthin
. Default:eagerZeroedThick
. For information on what each kind of disk provisioning policy means, click here. - vmdk_
path str - The path, including filename, of the virtual disk to
be created. This needs to end in
.vmdk
.
- adapter
Type String The adapter type for this virtual disk. Can be one of
ide
,lsiLogic
, orbusLogic
. Default:lsiLogic
.NOTE:
adapter_type
is deprecated: it does not dictate the type of controller that the virtual disk will be attached to on the virtual machine. Please see thescsi_type
parameter in thevsphere.VirtualMachine
resource for information on how to control disk controller types. This parameter will be removed in future versions of the vSphere provider.- create
Directories Boolean Tells the resource to create any directories that are a part of the
vmdk_path
parameter if they are missing. Default:false
.NOTE: Any directory created as part of the operation when
create_directories
is enabled will not be deleted when the resource is destroyed.- datacenter String
- The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.
- datastore String
- The name of the datastore in which to create the disk.
- size Number
- Size of the disk (in GB).
- type String
- The type of disk to create. Can be one of
eagerZeroedThick
,lazy
, orthin
. Default:eagerZeroedThick
. For information on what each kind of disk provisioning policy means, click here. - vmdk
Path String - The path, including filename, of the virtual disk to
be created. This needs to end in
.vmdk
.
Package Details
- Repository
- vSphere pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vsphere
Terraform Provider.