diff --git a/CHANGELOG.md b/CHANGELOG.md index 194424a8..13e99a88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +## v1.38.7 (2024-03-08) + +FEATURES: + +* `resource/ucloud_disk_attachment`: add `device_name` attribute. + +## v1.38.6 (2024-02-26) + +BUG FIXES: + +* `resource/ucloud_instance`: ignore min_cpu_platform change from null to Intel/Auto + +## v1.38.5 (2024-02-26) + +BUG FIXES: + +* `resource/ucloud_instance`: add a default value of min_cpu_platform + +## v1.38.4 (2024-02-01) + +BUG FIXES: + +* `resource/ucloud_instance`: fix panic issue while detaching disk in a host + ## 1.38.3 (2023-11-22) BUG FIXES: diff --git a/ucloud/resource_ucloud_disk_attachment.go b/ucloud/resource_ucloud_disk_attachment.go index c7c39990..eb38c08b 100644 --- a/ucloud/resource_ucloud_disk_attachment.go +++ b/ucloud/resource_ucloud_disk_attachment.go @@ -43,6 +43,11 @@ func resourceUCloudDiskAttachment() *schema.Resource { Type: schema.TypeBool, Optional: true, }, + + "device_name": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -100,6 +105,7 @@ func resourceUCloudDiskAttachmentRead(d *schema.ResourceData, meta interface{}) d.Set("availability_zone", d.Get("availability_zone").(string)) d.Set("instance_id", resourceSet.UHostId) d.Set("disk_id", resourceSet.UDiskId) + d.Set("device_name", resourceSet.DeviceName) return nil } diff --git a/website/docs/r/disk_attachment.html.markdown b/website/docs/r/disk_attachment.html.markdown index 7e200a41..ab2be69c 100644 --- a/website/docs/r/disk_attachment.html.markdown +++ b/website/docs/r/disk_attachment.html.markdown @@ -59,4 +59,10 @@ The following arguments are supported: * `instance_id` - (Required, ForceNew) The ID of instance. * `disk_id` - (Required, ForceNew) The ID of disk that needs to be attached * `stop_instance_before_detaching` - (Optional, Boolean) Set this to true to ensure that the target instance is stopped - before trying to detach the volume. \ No newline at end of file + before trying to detach the volume. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `device_name` - The device name to expose to the instance, for example `vdb`. \ No newline at end of file