1. Registry
  2. Packages
  3. Ucloud Provider
  4. API Docs
  5. Disk
Viewing docs for ucloud 1.42.0
published on Friday, Sep 11, 2026 by ucloud
Viewing docs for ucloud 1.42.0
published on Friday, Sep 11, 2026 by ucloud

    Provides a Cloud Disk resource.

    Note If the disk have attached to the instance and reboot_instance_for_resizing is not set to false, the instance will reboot automatically to make the change take effect when update the disk_size by default.

    Note When the disk is created from a snapshot by snapshot_id, the disk_type is decided by the source snapshot instead of the configuration. Leave disk_type unset so that it follows the snapshot, otherwise it must be set to exactly the type of the source snapshot.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ucloud from "@pulumi/ucloud";
    
    // Query availability zone
    const _default = ucloud.getZones({});
    // Create cloud disk
    const example = new ucloud.Disk("example", {
        availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
        name: "tf-example-disk",
        diskSize: 10,
    });
    
    import pulumi
    import pulumi_ucloud as ucloud
    
    # Query availability zone
    default = ucloud.get_zones()
    # Create cloud disk
    example = ucloud.Disk("example",
        availability_zone=default.zones[0].id,
        name="tf-example-disk",
        disk_size=10)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Query availability zone
    		_default, err := ucloud.GetZones(ctx, &ucloud.GetZonesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		// Create cloud disk
    		_, err = ucloud.NewDisk(ctx, "example", &ucloud.DiskArgs{
    			AvailabilityZone: pulumi.String(_default.Zones[0].Id),
    			Name:             pulumi.String("tf-example-disk"),
    			DiskSize:         pulumi.Float64(10),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ucloud = Pulumi.Ucloud;
    
    return await Deployment.RunAsync(() => 
    {
        // Query availability zone
        var @default = Ucloud.GetZones.Invoke();
    
        // Create cloud disk
        var example = new Ucloud.Disk("example", new()
        {
            AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            Name = "tf-example-disk",
            DiskSize = 10,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ucloud.UcloudFunctions;
    import com.pulumi.ucloud.inputs.GetZonesArgs;
    import com.pulumi.ucloud.Disk;
    import com.pulumi.ucloud.DiskArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // Query availability zone
            final var default = UcloudFunctions.getZones(GetZonesArgs.builder()
                .build());
    
            // Create cloud disk
            var example = new Disk("example", DiskArgs.builder()
                .availabilityZone(default_.zones()[0].id())
                .name("tf-example-disk")
                .diskSize(10.0)
                .build());
    
        }
    }
    
    resources:
      # Create cloud disk
      example:
        type: ucloud:Disk
        properties:
          availabilityZone: ${default.zones[0].id}
          name: tf-example-disk
          diskSize: 10
    variables:
      # Query availability zone
      default:
        fn::invoke:
          function: ucloud:getZones
          arguments: {}
    
    Example coming soon!
    

    Create a cloud disk from an existing snapshot:

    import * as pulumi from "@pulumi/pulumi";
    import * as ucloud from "@pulumi/ucloud";
    
    const _default = ucloud.getZones({});
    const example = new ucloud.Disk("example", {
        availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
        name: "tf-example-disk",
        diskSize: 20,
        diskType: "ssd_data_disk",
        snapshotService: true,
    });
    const exampleDiskSnapshot = new ucloud.DiskSnapshot("example", {
        availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
        diskId: example.diskId,
        name: "tf-example-disk-snapshot",
    });
    // the cloned disk is a ssd_data_disk as its source snapshot
    const cloned = new ucloud.Disk("cloned", {
        availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
        name: "tf-example-disk-cloned",
        diskSize: 20,
        snapshotId: exampleDiskSnapshot.diskSnapshotId,
    });
    
    import pulumi
    import pulumi_ucloud as ucloud
    
    default = ucloud.get_zones()
    example = ucloud.Disk("example",
        availability_zone=default.zones[0].id,
        name="tf-example-disk",
        disk_size=20,
        disk_type="ssd_data_disk",
        snapshot_service=True)
    example_disk_snapshot = ucloud.DiskSnapshot("example",
        availability_zone=default.zones[0].id,
        disk_id=example.disk_id,
        name="tf-example-disk-snapshot")
    # the cloned disk is a ssd_data_disk as its source snapshot
    cloned = ucloud.Disk("cloned",
        availability_zone=default.zones[0].id,
        name="tf-example-disk-cloned",
        disk_size=20,
        snapshot_id=example_disk_snapshot.disk_snapshot_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := ucloud.GetZones(ctx, &ucloud.GetZonesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		example, err := ucloud.NewDisk(ctx, "example", &ucloud.DiskArgs{
    			AvailabilityZone: pulumi.String(_default.Zones[0].Id),
    			Name:             pulumi.String("tf-example-disk"),
    			DiskSize:         pulumi.Float64(20),
    			DiskType:         pulumi.String("ssd_data_disk"),
    			SnapshotService:  pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		exampleDiskSnapshot, err := ucloud.NewDiskSnapshot(ctx, "example", &ucloud.DiskSnapshotArgs{
    			AvailabilityZone: pulumi.String(_default.Zones[0].Id),
    			DiskId:           example.DiskId,
    			Name:             pulumi.String("tf-example-disk-snapshot"),
    		})
    		if err != nil {
    			return err
    		}
    		// the cloned disk is a ssd_data_disk as its source snapshot
    		_, err = ucloud.NewDisk(ctx, "cloned", &ucloud.DiskArgs{
    			AvailabilityZone: pulumi.String(_default.Zones[0].Id),
    			Name:             pulumi.String("tf-example-disk-cloned"),
    			DiskSize:         pulumi.Float64(20),
    			SnapshotId:       exampleDiskSnapshot.DiskSnapshotId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ucloud = Pulumi.Ucloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Ucloud.GetZones.Invoke();
    
        var example = new Ucloud.Disk("example", new()
        {
            AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            Name = "tf-example-disk",
            DiskSize = 20,
            DiskType = "ssd_data_disk",
            SnapshotService = true,
        });
    
        var exampleDiskSnapshot = new Ucloud.DiskSnapshot("example", new()
        {
            AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            DiskId = example.DiskId,
            Name = "tf-example-disk-snapshot",
        });
    
        // the cloned disk is a ssd_data_disk as its source snapshot
        var cloned = new Ucloud.Disk("cloned", new()
        {
            AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            Name = "tf-example-disk-cloned",
            DiskSize = 20,
            SnapshotId = exampleDiskSnapshot.DiskSnapshotId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ucloud.UcloudFunctions;
    import com.pulumi.ucloud.inputs.GetZonesArgs;
    import com.pulumi.ucloud.Disk;
    import com.pulumi.ucloud.DiskArgs;
    import com.pulumi.ucloud.DiskSnapshot;
    import com.pulumi.ucloud.DiskSnapshotArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var default = UcloudFunctions.getZones(GetZonesArgs.builder()
                .build());
    
            var example = new Disk("example", DiskArgs.builder()
                .availabilityZone(default_.zones()[0].id())
                .name("tf-example-disk")
                .diskSize(20.0)
                .diskType("ssd_data_disk")
                .snapshotService(true)
                .build());
    
            var exampleDiskSnapshot = new DiskSnapshot("exampleDiskSnapshot", DiskSnapshotArgs.builder()
                .availabilityZone(default_.zones()[0].id())
                .diskId(example.diskId())
                .name("tf-example-disk-snapshot")
                .build());
    
            // the cloned disk is a ssd_data_disk as its source snapshot
            var cloned = new Disk("cloned", DiskArgs.builder()
                .availabilityZone(default_.zones()[0].id())
                .name("tf-example-disk-cloned")
                .diskSize(20.0)
                .snapshotId(exampleDiskSnapshot.diskSnapshotId())
                .build());
    
        }
    }
    
    resources:
      example:
        type: ucloud:Disk
        properties:
          availabilityZone: ${default.zones[0].id}
          name: tf-example-disk
          diskSize: 20
          diskType: ssd_data_disk
          snapshotService: true
      exampleDiskSnapshot:
        type: ucloud:DiskSnapshot
        name: example
        properties:
          availabilityZone: ${default.zones[0].id}
          diskId: ${example.diskId}
          name: tf-example-disk-snapshot
      # the cloned disk is a ssd_data_disk as its source snapshot
      cloned:
        type: ucloud:Disk
        properties:
          availabilityZone: ${default.zones[0].id}
          name: tf-example-disk-cloned
          diskSize: 20
          snapshotId: ${exampleDiskSnapshot.diskSnapshotId}
    variables:
      default:
        fn::invoke:
          function: ucloud:getZones
          arguments: {}
    
    Example coming soon!
    

    Create Disk Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Disk(name: string, args: DiskArgs, opts?: CustomResourceOptions);
    @overload
    def Disk(resource_name: str,
             args: DiskArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Disk(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             availability_zone: Optional[str] = None,
             disk_size: Optional[float] = None,
             charge_type: Optional[str] = None,
             disk_id: Optional[str] = None,
             disk_type: Optional[str] = None,
             duration: Optional[float] = None,
             name: Optional[str] = None,
             rdma_cluster_id: Optional[str] = None,
             reboot_instance_for_resizing: Optional[bool] = None,
             snapshot_id: Optional[str] = None,
             snapshot_service: Optional[bool] = None,
             tag: Optional[str] = None)
    func NewDisk(ctx *Context, name string, args DiskArgs, opts ...ResourceOption) (*Disk, error)
    public Disk(string name, DiskArgs args, CustomResourceOptions? opts = null)
    public Disk(String name, DiskArgs args)
    public Disk(String name, DiskArgs args, CustomResourceOptions options)
    
    type: ucloud:Disk
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "ucloud_disk" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args DiskArgs
    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 DiskArgs
    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 DiskArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DiskArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DiskArgs
    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 diskResource = new Ucloud.Disk("diskResource", new()
    {
        AvailabilityZone = "string",
        DiskSize = 0.0,
        ChargeType = "string",
        DiskId = "string",
        DiskType = "string",
        Duration = 0.0,
        Name = "string",
        RdmaClusterId = "string",
        RebootInstanceForResizing = false,
        SnapshotId = "string",
        SnapshotService = false,
        Tag = "string",
    });
    
    example, err := ucloud.NewDisk(ctx, "diskResource", &ucloud.DiskArgs{
    	AvailabilityZone:          pulumi.String("string"),
    	DiskSize:                  pulumi.Float64(0),
    	ChargeType:                pulumi.String("string"),
    	DiskId:                    pulumi.String("string"),
    	DiskType:                  pulumi.String("string"),
    	Duration:                  pulumi.Float64(0),
    	Name:                      pulumi.String("string"),
    	RdmaClusterId:             pulumi.String("string"),
    	RebootInstanceForResizing: pulumi.Bool(false),
    	SnapshotId:                pulumi.String("string"),
    	SnapshotService:           pulumi.Bool(false),
    	Tag:                       pulumi.String("string"),
    })
    
    resource "ucloud_disk" "diskResource" {
      lifecycle {
        create_before_destroy = true
      }
      availability_zone            = "string"
      disk_size                    = 0
      charge_type                  = "string"
      disk_id                      = "string"
      disk_type                    = "string"
      duration                     = 0
      name                         = "string"
      rdma_cluster_id              = "string"
      reboot_instance_for_resizing = false
      snapshot_id                  = "string"
      snapshot_service             = false
      tag                          = "string"
    }
    
    var diskResource = new Disk("diskResource", DiskArgs.builder()
        .availabilityZone("string")
        .diskSize(0.0)
        .chargeType("string")
        .diskId("string")
        .diskType("string")
        .duration(0.0)
        .name("string")
        .rdmaClusterId("string")
        .rebootInstanceForResizing(false)
        .snapshotId("string")
        .snapshotService(false)
        .tag("string")
        .build());
    
    disk_resource = ucloud.Disk("diskResource",
        availability_zone="string",
        disk_size=float(0),
        charge_type="string",
        disk_id="string",
        disk_type="string",
        duration=float(0),
        name="string",
        rdma_cluster_id="string",
        reboot_instance_for_resizing=False,
        snapshot_id="string",
        snapshot_service=False,
        tag="string")
    
    const diskResource = new ucloud.Disk("diskResource", {
        availabilityZone: "string",
        diskSize: 0,
        chargeType: "string",
        diskId: "string",
        diskType: "string",
        duration: 0,
        name: "string",
        rdmaClusterId: "string",
        rebootInstanceForResizing: false,
        snapshotId: "string",
        snapshotService: false,
        tag: "string",
    });
    
    type: ucloud:Disk
    properties:
        availabilityZone: string
        chargeType: string
        diskId: string
        diskSize: 0
        diskType: string
        duration: 0
        name: string
        rdmaClusterId: string
        rebootInstanceForResizing: false
        snapshotId: string
        snapshotService: false
        tag: string
    

    Disk 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 Disk resource accepts the following input properties:

    AvailabilityZone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    DiskSize double
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    ChargeType string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    DiskId string
    The ID of the resource disk.
    DiskType string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    Duration double
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    Name string
    RdmaClusterId string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    RebootInstanceForResizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    SnapshotId string
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    SnapshotService bool
    Tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    AvailabilityZone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    DiskSize float64
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    ChargeType string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    DiskId string
    The ID of the resource disk.
    DiskType string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    Duration float64
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    Name string
    RdmaClusterId string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    RebootInstanceForResizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    SnapshotId string
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    SnapshotService bool
    Tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availability_zone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    disk_size number
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    charge_type string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    disk_id string
    The ID of the resource disk.
    disk_type string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    duration number
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    name string
    rdma_cluster_id string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    reboot_instance_for_resizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    snapshot_id string
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    snapshot_service bool
    tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availabilityZone String
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    diskSize Double
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    chargeType String
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    diskId String
    The ID of the resource disk.
    diskType String
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    duration Double
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    name String
    rdmaClusterId String
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    rebootInstanceForResizing Boolean
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    snapshotId String
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    snapshotService Boolean
    tag String
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availabilityZone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    diskSize number
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    chargeType string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    diskId string
    The ID of the resource disk.
    diskType string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    duration number
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    name string
    rdmaClusterId string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    rebootInstanceForResizing boolean
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    snapshotId string
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    snapshotService boolean
    tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availability_zone str
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    disk_size float
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    charge_type str
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    disk_id str
    The ID of the resource disk.
    disk_type str
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    duration float
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    name str
    rdma_cluster_id str
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    reboot_instance_for_resizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    snapshot_id str
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    snapshot_service bool
    tag str
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availabilityZone String
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    diskSize Number
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    chargeType String
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    diskId String
    The ID of the resource disk.
    diskType String
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    duration Number
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    name String
    rdmaClusterId String
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    rebootInstanceForResizing Boolean
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    snapshotId String
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    snapshotService Boolean
    tag String
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Disk resource produces the following output properties:

    CreateTime string
    The time of creation of disk, formatted in RFC3339 time string.
    ExpireTime string
    The expiration time of disk, formatted in RFC3339 time string.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    CreateTime string
    The time of creation of disk, formatted in RFC3339 time string.
    ExpireTime string
    The expiration time of disk, formatted in RFC3339 time string.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    create_time string
    The time of creation of disk, formatted in RFC3339 time string.
    expire_time string
    The expiration time of disk, formatted in RFC3339 time string.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    createTime String
    The time of creation of disk, formatted in RFC3339 time string.
    expireTime String
    The expiration time of disk, formatted in RFC3339 time string.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    createTime string
    The time of creation of disk, formatted in RFC3339 time string.
    expireTime string
    The expiration time of disk, formatted in RFC3339 time string.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    create_time str
    The time of creation of disk, formatted in RFC3339 time string.
    expire_time str
    The expiration time of disk, formatted in RFC3339 time string.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    createTime String
    The time of creation of disk, formatted in RFC3339 time string.
    expireTime String
    The expiration time of disk, formatted in RFC3339 time string.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.

    Look up Existing Disk Resource

    Get an existing Disk 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?: DiskState, opts?: CustomResourceOptions): Disk
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            availability_zone: Optional[str] = None,
            charge_type: Optional[str] = None,
            create_time: Optional[str] = None,
            disk_id: Optional[str] = None,
            disk_size: Optional[float] = None,
            disk_type: Optional[str] = None,
            duration: Optional[float] = None,
            expire_time: Optional[str] = None,
            name: Optional[str] = None,
            rdma_cluster_id: Optional[str] = None,
            reboot_instance_for_resizing: Optional[bool] = None,
            snapshot_id: Optional[str] = None,
            snapshot_service: Optional[bool] = None,
            status: Optional[str] = None,
            tag: Optional[str] = None) -> Disk
    func GetDisk(ctx *Context, name string, id IDInput, state *DiskState, opts ...ResourceOption) (*Disk, error)
    public static Disk Get(string name, Input<string> id, DiskState? state, CustomResourceOptions? opts = null)
    public static Disk get(String name, Output<String> id, DiskState state, CustomResourceOptions options)
    resources:  _:    type: ucloud:Disk    get:      id: ${id}
    import {
      to = ucloud_disk.example
      id = "${id}"
    }
    
    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.
    The following state arguments are supported:
    AvailabilityZone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    ChargeType string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    CreateTime string
    The time of creation of disk, formatted in RFC3339 time string.
    DiskId string
    The ID of the resource disk.
    DiskSize double
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    DiskType string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    Duration double
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    ExpireTime string
    The expiration time of disk, formatted in RFC3339 time string.
    Name string
    RdmaClusterId string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    RebootInstanceForResizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    SnapshotId string
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    SnapshotService bool
    Status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    Tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    AvailabilityZone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    ChargeType string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    CreateTime string
    The time of creation of disk, formatted in RFC3339 time string.
    DiskId string
    The ID of the resource disk.
    DiskSize float64
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    DiskType string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    Duration float64
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    ExpireTime string
    The expiration time of disk, formatted in RFC3339 time string.
    Name string
    RdmaClusterId string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    RebootInstanceForResizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    SnapshotId string
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    SnapshotService bool
    Status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    Tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availability_zone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    charge_type string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    create_time string
    The time of creation of disk, formatted in RFC3339 time string.
    disk_id string
    The ID of the resource disk.
    disk_size number
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    disk_type string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    duration number
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    expire_time string
    The expiration time of disk, formatted in RFC3339 time string.
    name string
    rdma_cluster_id string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    reboot_instance_for_resizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    snapshot_id string
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    snapshot_service bool
    status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availabilityZone String
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    chargeType String
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    createTime String
    The time of creation of disk, formatted in RFC3339 time string.
    diskId String
    The ID of the resource disk.
    diskSize Double
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    diskType String
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    duration Double
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    expireTime String
    The expiration time of disk, formatted in RFC3339 time string.
    name String
    rdmaClusterId String
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    rebootInstanceForResizing Boolean
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    snapshotId String
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    snapshotService Boolean
    status String
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    tag String
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availabilityZone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    chargeType string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    createTime string
    The time of creation of disk, formatted in RFC3339 time string.
    diskId string
    The ID of the resource disk.
    diskSize number
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    diskType string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    duration number
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    expireTime string
    The expiration time of disk, formatted in RFC3339 time string.
    name string
    rdmaClusterId string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    rebootInstanceForResizing boolean
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    snapshotId string
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    snapshotService boolean
    status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availability_zone str
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    charge_type str
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    create_time str
    The time of creation of disk, formatted in RFC3339 time string.
    disk_id str
    The ID of the resource disk.
    disk_size float
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    disk_type str
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    duration float
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    expire_time str
    The expiration time of disk, formatted in RFC3339 time string.
    name str
    rdma_cluster_id str
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    reboot_instance_for_resizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    snapshot_id str
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    snapshot_service bool
    status str
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    tag str
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availabilityZone String
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    chargeType String
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    createTime String
    The time of creation of disk, formatted in RFC3339 time string.
    diskId String
    The ID of the resource disk.
    diskSize Number
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size. When snapshot_id is set, it must be larger than or equal to the size of the source snapshot.


    diskType String
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk. If it is not specified, data_disk is used for a newly created disk, while a disk created from snapshot_id follows the type of its source snapshot.
    duration Number
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    expireTime String
    The expiration time of disk, formatted in RFC3339 time string.
    name String
    rdmaClusterId String
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    rebootInstanceForResizing Boolean
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    snapshotId String
    The ID of the snapshot which the disk is created from. If it is set, the disk is cloned from the specified snapshot and inherits the type of that snapshot.
    snapshotService Boolean
    status String
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    tag String
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).

    Import

    Disk can be imported using the id, e.g.

    $ pulumi import ucloud:index/disk:Disk example bsm-abcdefg
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ucloud ucloud/terraform-provider-ucloud
    License
    Notes
    This Pulumi package is based on the ucloud Terraform Provider.
    Viewing docs for ucloud 1.42.0
    published on Friday, Sep 11, 2026 by ucloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial