diff --git a/outscale/data_source_outscale_volumes.go b/outscale/data_source_outscale_volumes.go index b94e1dfb2..16e57eafb 100644 --- a/outscale/data_source_outscale_volumes.go +++ b/outscale/data_source_outscale_volumes.go @@ -190,5 +190,5 @@ func getIops(volumeType string, iops int32) int32 { if volumeType != "standard" { return iops } - return defaultIops + return utils.DefaultIops } diff --git a/outscale/resource_outscale_nic_link.go b/outscale/resource_outscale_nic_link.go index 44546a086..9e97d2821 100644 --- a/outscale/resource_outscale_nic_link.go +++ b/outscale/resource_outscale_nic_link.go @@ -117,7 +117,7 @@ func resourceOutscaleOAPINetworkInterfaceAttachmentRead(d *schema.ResourceData, resp, err := stateConf.WaitForState() if err != nil { return fmt.Errorf( - "Error waiting for Volume to attach to Instance: %s, error: %s", nicID, err) + "Error waiting for NIC to attach to Instance: %s, error: %s", nicID, err) } r := resp.(oscgo.ReadNicsResponse) @@ -206,7 +206,7 @@ func resourceOutscaleNetworkInterfaceAttachmentImportState(d *schema.ResourceDat resp, err := stateConf.WaitForState() if err != nil { return nil, fmt.Errorf( - "Error waiting for Volume to attach to Instance: %s, error: %s", d.Id(), err) + "Error waiting for NIC to attach to Instance: %s, error: %s", d.Id(), err) } r := resp.(oscgo.ReadNicsResponse) linkNic := r.GetNics()[0].GetLinkNic() diff --git a/outscale/resource_outscale_volume.go b/outscale/resource_outscale_volume.go index 20da335cf..e4581e868 100644 --- a/outscale/resource_outscale_volume.go +++ b/outscale/resource_outscale_volume.go @@ -15,8 +15,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) -const defaultIops = 150 - func resourceOutscaleOAPIVolume() *schema.Resource { return &schema.Resource{ Create: resourceOAPIVolumeCreate, diff --git a/utils/utils.go b/utils/utils.go index e0ec3c613..5172415fc 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -26,7 +26,7 @@ const ( MaxPort int = 65535 MinIops int = 100 MaxIops int = 13000 - DefaultIops int = 150 + DefaultIops int32 = 150 MaxSize int = 14901 InvalidState string = "InvalidState" VolumeIOPSError string = `