Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add device_name attribute to ucloud_disk_attachment #163

Merged
merged 2 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
6 changes: 6 additions & 0 deletions ucloud/resource_ucloud_disk_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ func resourceUCloudDiskAttachment() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
},

"device_name": {
Type: schema.TypeString,
Computed: true,
},
},
}
}
Expand Down Expand Up @@ -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
}
Expand Down
8 changes: 7 additions & 1 deletion website/docs/r/disk_attachment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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`.
Loading