Skip to content

Commit

Permalink
Rename volume link resource
Browse files Browse the repository at this point in the history
  • Loading branch information
outscale-toa committed Jun 14, 2024
1 parent ccb3d1a commit b200e05
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions outscale/data_source_outscale_volumes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,19 @@ func testAccCheckOutscaleVolumesDataSourceConfigWithVM(region, imageID, keypair
vm_type = "tinav4.c2r2p2"
}
resource "outscale_volumes_link" "outscale_volumes_link" {
resource "outscale_volume_link" "outscale_volume_link" {
device_name = "/dev/xvdc"
volume_id = outscale_volume.outscale_volume.id
vm_id = outscale_vm.outscale_vm.id
}
resource "outscale_volumes_link" "outscale_volumes_link_2" {
resource "outscale_volume_link" "outscale_volume_link_2" {
device_name = "/dev/xvdd"
volume_id = outscale_volume.outscale_volume2.id
vm_id = outscale_vm.outscale_vm.id
}
resource "outscale_volumes_link" "outscale_volumes_link_3" {
resource "outscale_volume_link" "outscale_volume_link_3" {
device_name = "/dev/xvde"
volume_id = outscale_volume.outscale_volume3.id
vm_id = outscale_vm.outscale_vm.id
Expand Down
2 changes: 1 addition & 1 deletion outscale/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func Provider() *schema.Provider {
"outscale_public_ip": ResourceOutscalePublicIP(),
"outscale_public_ip_link": ResourceOutscalePublicIPLink(),
"outscale_volume": ResourceOutscaleVolume(),
"outscale_volumes_link": ResourceOutscaleVolumeLink(),
"outscale_volume_link": ResourceOutscaleVolumeLink(),
"outscale_net_attributes": ResourceOutscaleLinAttributes(),
"outscale_nat_service": ResourceOutscaleNatService(),
"outscale_subnet": ResourceOutscaleSubNet(),
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ func TestAccVM_WithVolumeAttachment_basic(t *testing.T) {
Config: testAccOAPIVolumeAttachmentConfig(omi, "tinav4.c2r2p2", utils.GetRegion(), keypair),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(
"outscale_volumes_link.ebs_att", "device_name", "/dev/sdh"),
"outscale_volume_link.ebs_att", "device_name", "/dev/sdh"),
testAccCheckOutscaleVMExists("outscale_vm.web", &i),
testAccCheckOAPIVolumeAttachmentExists(
"outscale_volumes_link.ebs_att", &i, &v),
"outscale_volume_link.ebs_att", &i, &v),
),
},
},
Expand All @@ -46,7 +46,7 @@ func TestAccVM_ImportVolumeAttachment_Basic(t *testing.T) {
omi := os.Getenv("OUTSCALE_IMAGEID")
keypair := os.Getenv("OUTSCALE_KEYPAIR")

resourceName := "outscale_volumes_link.ebs_att"
resourceName := "outscale_volume_link.ebs_att"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheckValues(t) },
Expand Down Expand Up @@ -130,7 +130,7 @@ func testAccOAPIVolumeAttachmentConfig(omi, vmType, region, keypair string) stri
size = 100
}
resource "outscale_volumes_link" "ebs_att" {
resource "outscale_volume_link" "ebs_att" {
device_name = "/dev/sdh"
volume_id = outscale_volume.volume.id
vm_id = outscale_vm.web.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@
},
{
"mode": "managed",
"type": "outscale_volumes_link",
"name": "outscale_volumes_link",
"type": "outscale_volume_link",
"name": "outscale_volume_link",
"provider": "provider[\"registry.terraform.io/outscale/outscale\"]",
"instances": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resource "outscale_vm" "outscale_vm" {
security_group_ids = [outscale_security_group.security_group_TF159.security_group_id]
}

resource "outscale_volumes_link" "outscale_volumes_link" {
resource "outscale_volume_link" "outscale_volume_link" {
device_name = "/dev/xvdc"
volume_id = outscale_volume.outscale_volume3.id
vm_id = outscale_vm.outscale_vm.id
Expand Down Expand Up @@ -56,5 +56,5 @@ data "outscale_volumes" "outscale_volumes" {
name = "volume_ids"
values = [outscale_volume.outscale_volume.volume_id, outscale_volume.outscale_volume2.volume_id, outscale_volume.outscale_volume3.volume_id]
}
depends_on = [outscale_volumes_link.outscale_volumes_link]
depends_on = [outscale_volume_link.outscale_volume_link]
}
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@
},
{
"mode": "managed",
"type": "outscale_volumes_link",
"name": "outscale_volumes_link",
"type": "outscale_volume_link",
"name": "outscale_volume_link",
"provider": "provider[\"registry.terraform.io/outscale/outscale\"]",
"instances": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resource "outscale_vm" "outscale_vm" {
security_group_ids = [outscale_security_group.security_group_TF159.security_group_id]
}

resource "outscale_volumes_link" "outscale_volumes_link" {
resource "outscale_volume_link" "outscale_volume_link" {
device_name = "/dev/xvdc"
volume_id = outscale_volume.outscale_volume3.id
vm_id = outscale_vm.outscale_vm.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@
},
{
"mode": "managed",
"type": "outscale_volumes_link",
"name": "outscale_volumes_link",
"type": "outscale_volume_link",
"name": "outscale_volume_link",
"provider": "provider[\"registry.terraform.io/outscale/outscale\"]",
"instances": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "outscale_vm" "outscale_vm" {
security_group_ids = [outscale_security_group.security_group_TF160.security_group_id]
}

resource "outscale_volumes_link" "outscale_volumes_link" {
resource "outscale_volume_link" "outscale_volume_link" {
device_name = "/dev/xvdc"
volume_id = outscale_volume.outscale_volume.id
vm_id = outscale_vm.outscale_vm.id
Expand Down

0 comments on commit b200e05

Please sign in to comment.