published on Monday, Aug 28, 2023 by pulumiverse
ESXi Nativepublished on Monday, Aug 28, 2023 by pulumiverse
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,
directory: Optional[str] = None,
disk_store: Optional[str] = None,
disk_type: Optional[DiskType] = None,
name: Optional[str] = None,
size: Optional[int] = 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: esxi-native:VirtualDisk
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "esxi-native_virtual_disk" "name" {
# resource properties
}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 EsxiNative.VirtualDisk("virtualDiskResource", new()
{
Directory = "string",
DiskStore = "string",
DiskType = EsxiNative.DiskType.Thin,
Name = "string",
Size = 0,
});
example, err := esxinative.NewVirtualDisk(ctx, "virtualDiskResource", &esxinative.VirtualDiskArgs{
Directory: pulumi.String("string"),
DiskStore: pulumi.String("string"),
DiskType: esxinative.DiskTypeThin,
Name: pulumi.String("string"),
Size: pulumi.Int(0),
})
resource "esxi-native_virtual_disk" "virtualDiskResource" {
lifecycle {
create_before_destroy = true
}
directory = "string"
disk_store = "string"
disk_type = "thin"
name = "string"
size = 0
}
var virtualDiskResource = new VirtualDisk("virtualDiskResource", VirtualDiskArgs.builder()
.directory("string")
.diskStore("string")
.diskType(com.pulumi.esxinative.enums.DiskType.Thin)
.name("string")
.size(0)
.build());
virtual_disk_resource = esxi_native.VirtualDisk("virtualDiskResource",
directory="string",
disk_store="string",
disk_type=esxi_native.DiskType.THIN,
name="string",
size=0)
const virtualDiskResource = new esxi_native.VirtualDisk("virtualDiskResource", {
directory: "string",
diskStore: "string",
diskType: esxi_native.DiskType.Thin,
name: "string",
size: 0,
});
type: esxi-native:VirtualDisk
properties:
directory: string
diskStore: string
diskType: thin
name: string
size: 0
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VirtualDisk resource accepts the following input properties:
- directory string
- Disk directory.
- disk_
store string - Disk Store.
- disk_
type "thin" | "zeroedthick" | "eagerzeroedthick" - Virtual Disk type. (thin, zeroedthick or eagerzeroedthick)
- name string
- Virtual Disk Name.
- size number
- Virtual Disk size in GB.
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 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>, opts?: CustomResourceOptions): VirtualDisk@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None) -> VirtualDiskfunc GetVirtualDisk(ctx *Context, name string, id IDInput, state *VirtualDiskState, opts ...ResourceOption) (*VirtualDisk, error)public static VirtualDisk Get(string name, Input<string> id, CustomResourceOptions? opts = null)public static VirtualDisk get(String name, Output<String> id, CustomResourceOptions options)resources: existingVirtualDisk: type: esxi-native:VirtualDisk get: id: ${id}import {
to = esxi-native_virtual_disk.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state VirtualDiskState
- Pass nil. This resource has no state arguments.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Supporting Types
DiskType
| Name | Value |
|---|---|
| Thin | thin |
| Zeroed | zeroedthick |
| Eager | eagerzeroedthick |
| Name | Value |
|---|---|
| Disk | thin |
| Disk | zeroedthick |
| Disk | eagerzeroedthick |
| Value |
|---|
thin |
zeroedthick |
eagerzeroedthick |
| Name | Value |
|---|---|
| Thin | thin |
| Zeroed | zeroedthick |
| Eager | eagerzeroedthick |
| Name | Value |
|---|---|
| Thin | thin |
| Zeroed | zeroedthick |
| Eager | eagerzeroedthick |
| Name | Value |
|---|---|
| THIN | thin |
| ZEROED_THICK | zeroedthick |
| EAGER_ZEROED_THICK | eagerzeroedthick |
| Value |
|---|
thin |
zeroedthick |
eagerzeroedthick |
Package Details
- Repository
- esxi-native pulumiverse/pulumi-esxi-native
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the Terraform Provider terraform-provider-esxi.
ESXi Nativepublished on Monday, Aug 28, 2023 by pulumiverse