provider/openstack: blockstorage volume attach code review updates
This commit is contained in:
parent
22dd265132
commit
4cc46937e8
|
@ -16,7 +16,6 @@ func resourceBlockStorageVolumeAttachV2() *schema.Resource {
|
||||||
return &schema.Resource{
|
return &schema.Resource{
|
||||||
Create: resourceBlockStorageVolumeAttachV2Create,
|
Create: resourceBlockStorageVolumeAttachV2Create,
|
||||||
Read: resourceBlockStorageVolumeAttachV2Read,
|
Read: resourceBlockStorageVolumeAttachV2Read,
|
||||||
Update: nil,
|
|
||||||
Delete: resourceBlockStorageVolumeAttachV2Delete,
|
Delete: resourceBlockStorageVolumeAttachV2Delete,
|
||||||
Importer: &schema.ResourceImporter{
|
Importer: &schema.ResourceImporter{
|
||||||
State: schema.ImportStatePassthrough,
|
State: schema.ImportStatePassthrough,
|
||||||
|
@ -233,6 +232,7 @@ func blockStorageVolumeAttachV2AttachMode(v string) (volumeactions.AttachMode, e
|
||||||
var attachError error
|
var attachError error
|
||||||
switch v {
|
switch v {
|
||||||
case "":
|
case "":
|
||||||
|
attachMode = ""
|
||||||
case "ro":
|
case "ro":
|
||||||
attachMode = volumeactions.ReadOnly
|
attachMode = volumeactions.ReadOnly
|
||||||
case "rw":
|
case "rw":
|
||||||
|
|
|
@ -53,6 +53,7 @@ The following arguments are supported:
|
||||||
|
|
||||||
* `attach_mode` - (Optional) Specify whether to attach the volume as Read-Only
|
* `attach_mode` - (Optional) Specify whether to attach the volume as Read-Only
|
||||||
(`ro`) or Read-Write (`rw`). Only values of `ro` and `rw` are accepted.
|
(`ro`) or Read-Write (`rw`). Only values of `ro` and `rw` are accepted.
|
||||||
|
If left unspecified, the Block Storage API will apply a default of `rw`.
|
||||||
|
|
||||||
## Attributes Reference
|
## Attributes Reference
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue