published on Sunday, May 10, 2026 by Pulumi
published on Sunday, May 10, 2026 by Pulumi
Provides a RDS Custom Disk Attachment resource.
Operating cloud disk mount and unmount resources.
For information about RDS Custom Disk Attachment and how to use it, see What is Custom Disk Attachment.
NOTE: Available since v1.275.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = alicloud.vpc.getNetworks({
nameRegex: "^default-NODELETING$",
});
const defaultGetSwitches = _default.then(_default => alicloud.vpc.getSwitches({
vpcId: _default.ids?.[0],
zoneId: "cn-hangzhou-i",
}));
const defaultGetSecurityGroups = _default.then(_default => alicloud.ecs.getSecurityGroups({
vpcId: _default.ids?.[0],
nameRegex: "default-NODELETING",
}));
const defaultCustom = new alicloud.rds.Custom("default", {
zoneId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.zoneId),
instanceChargeType: "PostPaid",
vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0]),
amount: 1,
securityGroupIds: [defaultGetSecurityGroups.then(defaultGetSecurityGroups => defaultGetSecurityGroups.ids?.[0])],
systemDisk: {
size: "40",
},
force: true,
instanceType: "mysql.x4.xlarge.6cm",
spotStrategy: "NoSpot",
});
const defaultCustomDisk = new alicloud.rds.CustomDisk("default", {
zoneId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.zoneId),
size: 40,
diskCategory: "cloud_ssd",
autoPay: true,
diskName: "ran_disk_attach",
});
const defaultCustomDiskAttachment = new alicloud.rds.CustomDiskAttachment("default", {
instanceId: defaultCustom.id,
diskId: defaultCustomDisk.id,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
default_get_switches = alicloud.vpc.get_switches(vpc_id=default.ids[0],
zone_id="cn-hangzhou-i")
default_get_security_groups = alicloud.ecs.get_security_groups(vpc_id=default.ids[0],
name_regex="default-NODELETING")
default_custom = alicloud.rds.Custom("default",
zone_id=default_get_switches.zone_id,
instance_charge_type="PostPaid",
vswitch_id=default_get_switches.ids[0],
amount=1,
security_group_ids=[default_get_security_groups.ids[0]],
system_disk={
"size": "40",
},
force=True,
instance_type="mysql.x4.xlarge.6cm",
spot_strategy="NoSpot")
default_custom_disk = alicloud.rds.CustomDisk("default",
zone_id=default_get_switches.zone_id,
size=40,
disk_category="cloud_ssd",
auto_pay=True,
disk_name="ran_disk_attach")
default_custom_disk_attachment = alicloud.rds.CustomDiskAttachment("default",
instance_id=default_custom.id,
disk_id=default_custom_disk.id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
NameRegex: pulumi.StringRef("^default-NODELETING$"),
}, nil)
if err != nil {
return err
}
defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
VpcId: pulumi.StringRef(_default.Ids[0]),
ZoneId: pulumi.StringRef("cn-hangzhou-i"),
}, nil)
if err != nil {
return err
}
defaultGetSecurityGroups, err := ecs.GetSecurityGroups(ctx, &ecs.GetSecurityGroupsArgs{
VpcId: pulumi.StringRef(_default.Ids[0]),
NameRegex: pulumi.StringRef("default-NODELETING"),
}, nil)
if err != nil {
return err
}
defaultCustom, err := rds.NewCustom(ctx, "default", &rds.CustomArgs{
ZoneId: pulumi.String(pulumi.String(defaultGetSwitches.ZoneId)),
InstanceChargeType: pulumi.String("PostPaid"),
VswitchId: pulumi.String(pulumi.String(defaultGetSwitches.Ids[0])),
Amount: pulumi.Int(1),
SecurityGroupIds: pulumi.StringArray{
pulumi.String(pulumi.String(defaultGetSecurityGroups.Ids[0])),
},
SystemDisk: &rds.CustomSystemDiskArgs{
Size: pulumi.String("40"),
},
Force: pulumi.Bool(true),
InstanceType: pulumi.String("mysql.x4.xlarge.6cm"),
SpotStrategy: pulumi.String("NoSpot"),
})
if err != nil {
return err
}
defaultCustomDisk, err := rds.NewCustomDisk(ctx, "default", &rds.CustomDiskArgs{
ZoneId: pulumi.String(pulumi.String(defaultGetSwitches.ZoneId)),
Size: pulumi.Int(40),
DiskCategory: pulumi.String("cloud_ssd"),
AutoPay: pulumi.Bool(true),
DiskName: pulumi.String("ran_disk_attach"),
})
if err != nil {
return err
}
_, err = rds.NewCustomDiskAttachment(ctx, "default", &rds.CustomDiskAttachmentArgs{
InstanceId: defaultCustom.ID(),
DiskId: defaultCustomDisk.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.Vpc.GetNetworks.Invoke(new()
{
NameRegex = "^default-NODELETING$",
});
var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
{
VpcId = @default.Apply(getNetworksResult => getNetworksResult.Ids[0]),
ZoneId = "cn-hangzhou-i",
});
var defaultGetSecurityGroups = AliCloud.Ecs.GetSecurityGroups.Invoke(new()
{
VpcId = @default.Apply(getNetworksResult => getNetworksResult.Ids[0]),
NameRegex = "default-NODELETING",
});
var defaultCustom = new AliCloud.Rds.Custom("default", new()
{
ZoneId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.ZoneId),
InstanceChargeType = "PostPaid",
VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
Amount = 1,
SecurityGroupIds = new[]
{
defaultGetSecurityGroups.Apply(getSecurityGroupsResult => getSecurityGroupsResult.Ids[0]),
},
SystemDisk = new AliCloud.Rds.Inputs.CustomSystemDiskArgs
{
Size = "40",
},
Force = true,
InstanceType = "mysql.x4.xlarge.6cm",
SpotStrategy = "NoSpot",
});
var defaultCustomDisk = new AliCloud.Rds.CustomDisk("default", new()
{
ZoneId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.ZoneId),
Size = 40,
DiskCategory = "cloud_ssd",
AutoPay = true,
DiskName = "ran_disk_attach",
});
var defaultCustomDiskAttachment = new AliCloud.Rds.CustomDiskAttachment("default", new()
{
InstanceId = defaultCustom.Id,
DiskId = defaultCustomDisk.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetSecurityGroupsArgs;
import com.pulumi.alicloud.rds.Custom;
import com.pulumi.alicloud.rds.CustomArgs;
import com.pulumi.alicloud.rds.inputs.CustomSystemDiskArgs;
import com.pulumi.alicloud.rds.CustomDisk;
import com.pulumi.alicloud.rds.CustomDiskArgs;
import com.pulumi.alicloud.rds.CustomDiskAttachment;
import com.pulumi.alicloud.rds.CustomDiskAttachmentArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var default = VpcFunctions.getNetworks(GetNetworksArgs.builder()
.nameRegex("^default-NODELETING$")
.build());
final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
.vpcId(default_.ids()[0])
.zoneId("cn-hangzhou-i")
.build());
final var defaultGetSecurityGroups = EcsFunctions.getSecurityGroups(GetSecurityGroupsArgs.builder()
.vpcId(default_.ids()[0])
.nameRegex("default-NODELETING")
.build());
var defaultCustom = new Custom("defaultCustom", CustomArgs.builder()
.zoneId(defaultGetSwitches.zoneId())
.instanceChargeType("PostPaid")
.vswitchId(defaultGetSwitches.ids()[0])
.amount(1)
.securityGroupIds(defaultGetSecurityGroups.ids()[0])
.systemDisk(CustomSystemDiskArgs.builder()
.size("40")
.build())
.force(true)
.instanceType("mysql.x4.xlarge.6cm")
.spotStrategy("NoSpot")
.build());
var defaultCustomDisk = new CustomDisk("defaultCustomDisk", CustomDiskArgs.builder()
.zoneId(defaultGetSwitches.zoneId())
.size(40)
.diskCategory("cloud_ssd")
.autoPay(true)
.diskName("ran_disk_attach")
.build());
var defaultCustomDiskAttachment = new CustomDiskAttachment("defaultCustomDiskAttachment", CustomDiskAttachmentArgs.builder()
.instanceId(defaultCustom.id())
.diskId(defaultCustomDisk.id())
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultCustom:
type: alicloud:rds:Custom
name: default
properties:
zoneId: ${defaultGetSwitches.zoneId}
instanceChargeType: PostPaid
vswitchId: ${defaultGetSwitches.ids[0]}
amount: '1'
securityGroupIds:
- ${defaultGetSecurityGroups.ids[0]}
systemDisk:
size: '40'
force: true
instanceType: mysql.x4.xlarge.6cm
spotStrategy: NoSpot
defaultCustomDisk:
type: alicloud:rds:CustomDisk
name: default
properties:
zoneId: ${defaultGetSwitches.zoneId}
size: '40'
diskCategory: cloud_ssd
autoPay: true
diskName: ran_disk_attach
defaultCustomDiskAttachment:
type: alicloud:rds:CustomDiskAttachment
name: default
properties:
instanceId: ${defaultCustom.id}
diskId: ${defaultCustomDisk.id}
variables:
default:
fn::invoke:
function: alicloud:vpc:getNetworks
arguments:
nameRegex: ^default-NODELETING$
defaultGetSwitches:
fn::invoke:
function: alicloud:vpc:getSwitches
arguments:
vpcId: ${default.ids[0]}
zoneId: cn-hangzhou-i
defaultGetSecurityGroups:
fn::invoke:
function: alicloud:ecs:getSecurityGroups
arguments:
vpcId: ${default.ids[0]}
nameRegex: default-NODELETING
Example coming soon!
📚 Need more examples? VIEW MORE EXAMPLES
Create CustomDiskAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomDiskAttachment(name: string, args: CustomDiskAttachmentArgs, opts?: CustomResourceOptions);@overload
def CustomDiskAttachment(resource_name: str,
args: CustomDiskAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CustomDiskAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
disk_id: Optional[str] = None,
instance_id: Optional[str] = None,
delete_with_instance: Optional[bool] = None)func NewCustomDiskAttachment(ctx *Context, name string, args CustomDiskAttachmentArgs, opts ...ResourceOption) (*CustomDiskAttachment, error)public CustomDiskAttachment(string name, CustomDiskAttachmentArgs args, CustomResourceOptions? opts = null)
public CustomDiskAttachment(String name, CustomDiskAttachmentArgs args)
public CustomDiskAttachment(String name, CustomDiskAttachmentArgs args, CustomResourceOptions options)
type: alicloud:rds:CustomDiskAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "alicloud_rds_customdiskattachment" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args CustomDiskAttachmentArgs
- 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 CustomDiskAttachmentArgs
- 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 CustomDiskAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomDiskAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomDiskAttachmentArgs
- 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 customDiskAttachmentResource = new AliCloud.Rds.CustomDiskAttachment("customDiskAttachmentResource", new()
{
DiskId = "string",
InstanceId = "string",
DeleteWithInstance = false,
});
example, err := rds.NewCustomDiskAttachment(ctx, "customDiskAttachmentResource", &rds.CustomDiskAttachmentArgs{
DiskId: pulumi.String("string"),
InstanceId: pulumi.String("string"),
DeleteWithInstance: pulumi.Bool(false),
})
resource "alicloud_rds_customdiskattachment" "customDiskAttachmentResource" {
disk_id = "string"
instance_id = "string"
delete_with_instance = false
}
var customDiskAttachmentResource = new CustomDiskAttachment("customDiskAttachmentResource", CustomDiskAttachmentArgs.builder()
.diskId("string")
.instanceId("string")
.deleteWithInstance(false)
.build());
custom_disk_attachment_resource = alicloud.rds.CustomDiskAttachment("customDiskAttachmentResource",
disk_id="string",
instance_id="string",
delete_with_instance=False)
const customDiskAttachmentResource = new alicloud.rds.CustomDiskAttachment("customDiskAttachmentResource", {
diskId: "string",
instanceId: "string",
deleteWithInstance: false,
});
type: alicloud:rds:CustomDiskAttachment
properties:
deleteWithInstance: false
diskId: string
instanceId: string
CustomDiskAttachment 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 CustomDiskAttachment resource accepts the following input properties:
- Disk
Id string - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- Instance
Id string - The ID of the target RDS Custom instance.
- Delete
With boolInstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
- Disk
Id string - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- Instance
Id string - The ID of the target RDS Custom instance.
- Delete
With boolInstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
- disk_
id string - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- instance_
id string - The ID of the target RDS Custom instance.
- delete_
with_ boolinstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
- disk
Id String - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- instance
Id String - The ID of the target RDS Custom instance.
- delete
With BooleanInstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
- disk
Id string - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- instance
Id string - The ID of the target RDS Custom instance.
- delete
With booleanInstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
- disk_
id str - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- instance_
id str - The ID of the target RDS Custom instance.
- delete_
with_ boolinstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
- disk
Id String - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- instance
Id String - The ID of the target RDS Custom instance.
- delete
With BooleanInstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomDiskAttachment resource produces the following output properties:
Look up Existing CustomDiskAttachment Resource
Get an existing CustomDiskAttachment 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?: CustomDiskAttachmentState, opts?: CustomResourceOptions): CustomDiskAttachment@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
delete_with_instance: Optional[bool] = None,
disk_id: Optional[str] = None,
instance_id: Optional[str] = None,
region_id: Optional[str] = None,
status: Optional[str] = None) -> CustomDiskAttachmentfunc GetCustomDiskAttachment(ctx *Context, name string, id IDInput, state *CustomDiskAttachmentState, opts ...ResourceOption) (*CustomDiskAttachment, error)public static CustomDiskAttachment Get(string name, Input<string> id, CustomDiskAttachmentState? state, CustomResourceOptions? opts = null)public static CustomDiskAttachment get(String name, Output<String> id, CustomDiskAttachmentState state, CustomResourceOptions options)resources: _: type: alicloud:rds:CustomDiskAttachment get: id: ${id}import {
to = alicloud_rds_customdiskattachment.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.
- Delete
With boolInstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
- Disk
Id string - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- Instance
Id string - The ID of the target RDS Custom instance.
- Region
Id string - The region ID of the resource.
- Status string
- The status of the disk.
- Delete
With boolInstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
- Disk
Id string - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- Instance
Id string - The ID of the target RDS Custom instance.
- Region
Id string - The region ID of the resource.
- Status string
- The status of the disk.
- delete_
with_ boolinstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
- disk_
id string - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- instance_
id string - The ID of the target RDS Custom instance.
- region_
id string - The region ID of the resource.
- status string
- The status of the disk.
- delete
With BooleanInstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
- disk
Id String - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- instance
Id String - The ID of the target RDS Custom instance.
- region
Id String - The region ID of the resource.
- status String
- The status of the disk.
- delete
With booleanInstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
- disk
Id string - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- instance
Id string - The ID of the target RDS Custom instance.
- region
Id string - The region ID of the resource.
- status string
- The status of the disk.
- delete_
with_ boolinstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
- disk_
id str - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- instance_
id str - The ID of the target RDS Custom instance.
- region_
id str - The region ID of the resource.
- status str
- The status of the disk.
- delete
With BooleanInstance - Whether the disk is released together with the instance when the instance is released. Value range: true: Release. false: Do not release. The disk is converted to a pay-as-you-go data disk and is retained. When Setting this parameter, you need to pay attention: After the DeleteWithInstance is set to false, once the instance is under security control, the value "LockReason" : "security" is marked in OperationLocks. When the instance is released, the disk will be ignored and released at the same time. If the target disk to be attached is an elastic temporary disk, you must set the DeleteWithInstance parameter to true. This parameter is not supported for cloud disks with the multi-Mount feature enabled.
- disk
Id String - The ID of the cloud disk to be mounted. The cloud disk ('DiskId') and the instance ('InstanceId') must be in the same zone.
- instance
Id String - The ID of the target RDS Custom instance.
- region
Id String - The region ID of the resource.
- status String
- The status of the disk.
Import
RDS Custom Disk Attachment can be imported using the id, e.g.
$ pulumi import alicloud:rds/customDiskAttachment:CustomDiskAttachment example <disk_id>:<instance_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
published on Sunday, May 10, 2026 by Pulumi
