Skip to content

Commit

Permalink
Merge pull request #1957 from jtopjian/openstack-volume-fixes
Browse files Browse the repository at this point in the history
provider/openstack: Minor volume fixes
  • Loading branch information
mitchellh committed May 14, 2015
2 parents ad62be8 + 4daaacd commit 8a3b75d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func resourceBlockStorageVolumeV1() *schema.Resource {
Type: schema.TypeMap,
Optional: true,
ForceNew: false,
Computed: true,
},
"snapshot_id": &schema.Schema{
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ func resourceComputeInstanceV2() *schema.Resource {
Schema: map[string]*schema.Schema{
"id": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"volume_id": &schema.Schema{
Expand Down Expand Up @@ -955,7 +954,6 @@ func resourceComputeVolumeAttachmentHash(v interface{}) int {
var buf bytes.Buffer
m := v.(map[string]interface{})
buf.WriteString(fmt.Sprintf("%s-", m["volume_id"].(string)))
buf.WriteString(fmt.Sprintf("%s-", m["device"].(string)))
return hashcode.String(buf.String())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestAccComputeV2Instance_basic(t *testing.T) {
})
}

func _TestAccComputeV2Instance_volumeAttach(t *testing.T) {
func TestAccComputeV2Instance_volumeAttach(t *testing.T) {
var instance servers.Server
var volume volumes.Volume

Expand Down Expand Up @@ -229,6 +229,7 @@ var testAccComputeV2Instance_volumeAttach = fmt.Sprintf(`
resource "openstack_compute_instance_v2" "foo" {
region = "%s"
name = "terraform-test"
security_groups = ["default"]
volume {
volume_id = "${openstack_blockstorage_volume_v1.myvol.id}"
}
Expand Down

0 comments on commit 8a3b75d

Please sign in to comment.