@@ -38,7 +38,7 @@ func TestAccServer_Minimal1(t *testing.T) {
38
38
resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "image" , "ubuntu_focal" ),
39
39
resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "type" , "DEV1-S" ),
40
40
resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "root_volume.0.delete_on_termination" , "true" ),
41
- resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "root_volume.0.size_in_gb" , "20 " ),
41
+ resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "root_volume.0.size_in_gb" , "10 " ),
42
42
resource .TestCheckResourceAttrSet ("scaleway_instance_server.base" , "root_volume.0.volume_id" ),
43
43
serverHasNewVolume (tt , "scaleway_instance_server.base" ),
44
44
resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "enable_dynamic_ip" , "false" ),
@@ -61,7 +61,7 @@ func TestAccServer_Minimal1(t *testing.T) {
61
61
resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "image" , "ubuntu_focal" ),
62
62
resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "type" , "DEV1-S" ),
63
63
resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "root_volume.0.delete_on_termination" , "true" ),
64
- resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "root_volume.0.size_in_gb" , "20 " ),
64
+ resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "root_volume.0.size_in_gb" , "10 " ),
65
65
resource .TestCheckResourceAttrSet ("scaleway_instance_server.base" , "root_volume.0.volume_id" ),
66
66
serverHasNewVolume (tt , "scaleway_instance_server.base" ),
67
67
resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "tags.0" , "terraform-test" ),
@@ -92,7 +92,7 @@ func TestAccServer_Minimal2(t *testing.T) {
92
92
resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "image" , "ubuntu_focal" ),
93
93
resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "type" , "DEV1-S" ),
94
94
resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "root_volume.0.delete_on_termination" , "true" ),
95
- resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "root_volume.0.size_in_gb" , "20 " ),
95
+ resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "root_volume.0.size_in_gb" , "10 " ),
96
96
resource .TestCheckResourceAttrSet ("scaleway_instance_server.base" , "root_volume.0.volume_id" ),
97
97
resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "enable_dynamic_ip" , "false" ),
98
98
resource .TestCheckResourceAttr ("scaleway_instance_server.base" , "state" , "started" ),
@@ -112,7 +112,7 @@ func TestAccServer_Minimal2(t *testing.T) {
112
112
resource .TestCheckResourceAttr ("scaleway_instance_server.main" , "image" , "ubuntu_focal" ),
113
113
resource .TestCheckResourceAttr ("scaleway_instance_server.main" , "type" , "DEV1-S" ),
114
114
resource .TestCheckResourceAttr ("scaleway_instance_server.main" , "root_volume.0.delete_on_termination" , "true" ),
115
- resource .TestCheckResourceAttr ("scaleway_instance_server.main" , "root_volume.0.size_in_gb" , "20" ),
115
+ resource .TestCheckResourceAttr ("scaleway_instance_server.main" , "root_volume.0.size_in_gb" , "20" ), // It resizes to 20GB as terraform will take max space available for l_ssd.
116
116
resource .TestCheckResourceAttr ("scaleway_instance_server.main" , "root_volume.0.volume_type" , "l_ssd" ),
117
117
resource .TestCheckResourceAttrSet ("scaleway_instance_server.main" , "root_volume.0.volume_id" ),
118
118
resource .TestCheckResourceAttr ("scaleway_instance_server.main" , "enable_dynamic_ip" , "false" ),
@@ -160,6 +160,7 @@ func TestAccServer_RootVolume1(t *testing.T) {
160
160
image = "ubuntu_focal"
161
161
type = "DEV1-S"
162
162
root_volume {
163
+ volume_type = "l_ssd"
163
164
size_in_gb = 10
164
165
delete_on_termination = true
165
166
}
@@ -178,6 +179,7 @@ func TestAccServer_RootVolume1(t *testing.T) {
178
179
image = "ubuntu_focal"
179
180
type = "DEV1-S"
180
181
root_volume {
182
+ volume_type = "l_ssd"
181
183
size_in_gb = 20
182
184
delete_on_termination = true
183
185
}
@@ -1023,7 +1025,7 @@ func TestAccServer_WithDefaultRootVolumeAndAdditionalVolume(t *testing.T) {
1023
1025
1024
1026
resource "scaleway_instance_server" "main" {
1025
1027
type = "DEV1-S"
1026
- image = "ubuntu-bionic "
1028
+ image = "ubuntu-jammy "
1027
1029
root_volume {
1028
1030
delete_on_termination = false
1029
1031
}
@@ -1287,7 +1289,9 @@ func TestAccServer_MigrateInvalidLocalVolumeSize(t *testing.T) {
1287
1289
resource "scaleway_instance_server" "main" {
1288
1290
image = "ubuntu_jammy"
1289
1291
type = "DEV1-L"
1290
-
1292
+ root_volume {
1293
+ volume_type = "l_ssd"
1294
+ }
1291
1295
}` ,
1292
1296
Check : resource .ComposeTestCheckFunc (
1293
1297
arePrivateNICsPresent (tt , "scaleway_instance_server.main" ),
@@ -1299,7 +1303,9 @@ func TestAccServer_MigrateInvalidLocalVolumeSize(t *testing.T) {
1299
1303
resource "scaleway_instance_server" "main" {
1300
1304
image = "ubuntu_jammy"
1301
1305
type = "DEV1-S"
1302
-
1306
+ root_volume {
1307
+ volume_type = "l_ssd"
1308
+ }
1303
1309
}` ,
1304
1310
Check : resource .ComposeTestCheckFunc (
1305
1311
arePrivateNICsPresent (tt , "scaleway_instance_server.main" ),
@@ -1326,6 +1332,9 @@ func TestAccServer_CustomDiffImage(t *testing.T) {
1326
1332
image = "ubuntu_jammy"
1327
1333
type = "DEV1-S"
1328
1334
state = "stopped"
1335
+ root_volume {
1336
+ volume_type = "l_ssd" // Keep this while data.scaleway_marketplace_image does not provide a image_type filter.
1337
+ }
1329
1338
}
1330
1339
` ,
1331
1340
Check : resource .ComposeTestCheckFunc (
@@ -1339,11 +1348,17 @@ func TestAccServer_CustomDiffImage(t *testing.T) {
1339
1348
image = "ubuntu_jammy"
1340
1349
type = "DEV1-S"
1341
1350
state = "stopped"
1351
+ root_volume {
1352
+ volume_type = "l_ssd" // Keep this while data.scaleway_marketplace_image does not provide a image_type filter.
1353
+ }
1342
1354
}
1343
1355
resource "scaleway_instance_server" "copy" {
1344
1356
image = "ubuntu_jammy"
1345
1357
type = "DEV1-S"
1346
1358
state = "stopped"
1359
+ root_volume {
1360
+ volume_type = "l_ssd" // Keep this while data.scaleway_marketplace_image does not provide a image_type filter.
1361
+ }
1347
1362
}
1348
1363
` ,
1349
1364
Check : resource .ComposeTestCheckFunc (
@@ -1369,11 +1384,17 @@ func TestAccServer_CustomDiffImage(t *testing.T) {
1369
1384
image = data.scaleway_marketplace_image.jammy.id
1370
1385
type = "DEV1-S"
1371
1386
state = "stopped"
1387
+ root_volume {
1388
+ volume_type = "l_ssd" // Keep this while data.scaleway_marketplace_image does not provide a image_type filter.
1389
+ }
1372
1390
}
1373
1391
resource "scaleway_instance_server" "copy" {
1374
1392
image = "ubuntu_jammy"
1375
1393
type = "DEV1-S"
1376
1394
state = "stopped"
1395
+ root_volume {
1396
+ volume_type = "l_ssd" // Keep this while data.scaleway_marketplace_image does not provide a image_type filter.
1397
+ }
1377
1398
}
1378
1399
` ,
1379
1400
Check : resource .ComposeTestCheckFunc (
@@ -1401,11 +1422,17 @@ func TestAccServer_CustomDiffImage(t *testing.T) {
1401
1422
image = data.scaleway_marketplace_image.focal.id
1402
1423
type = "DEV1-S"
1403
1424
state = "stopped"
1425
+ root_volume {
1426
+ volume_type = "l_ssd" // Keep this while data.scaleway_marketplace_image does not provide a image_type filter.
1427
+ }
1404
1428
}
1405
1429
resource "scaleway_instance_server" "copy" {
1406
1430
image = "ubuntu_jammy"
1407
1431
type = "DEV1-S"
1408
1432
state = "stopped"
1433
+ root_volume {
1434
+ volume_type = "l_ssd" // Keep this while data.scaleway_marketplace_image does not provide a image_type filter.
1435
+ }
1409
1436
}
1410
1437
` ,
1411
1438
PlanOnly : true ,
0 commit comments