@@ -139,6 +139,22 @@ func resourceScalewayK8SPool() *schema.Resource {
139
139
},
140
140
},
141
141
},
142
+ "root_volume_type" : {
143
+ Type : schema .TypeString ,
144
+ Optional : true ,
145
+ ForceNew : true ,
146
+ Description : "System volume type of the nodes composing the pool" ,
147
+ ValidateFunc : validation .StringInSlice ([]string {
148
+ k8s .PoolVolumeTypeBSSD .String (),
149
+ k8s .PoolVolumeTypeLSSD .String (),
150
+ }, false ),
151
+ },
152
+ "root_volume_size_in_gb" : {
153
+ Type : schema .TypeInt ,
154
+ Optional : true ,
155
+ ForceNew : true ,
156
+ Description : "The size of the system volume of the nodes in gigabyte" ,
157
+ },
142
158
"zone" : zoneSchema (),
143
159
"region" : regionSchema (),
144
160
// Computed elements
@@ -253,6 +269,15 @@ func resourceScalewayK8SPoolCreate(ctx context.Context, d *schema.ResourceData,
253
269
upgradePolicyReq .MaxUnavailable = scw .Uint32Ptr (uint32 (maxUnavailable .(int )))
254
270
}
255
271
272
+ if volumeType , ok := d .GetOk ("root_volume_type" ); ok {
273
+ req .RootVolumeType = k8s .PoolVolumeType (volumeType .(string ))
274
+ }
275
+
276
+ if volumeSize , ok := d .GetOk ("root_volume_size_in_gb" ); ok {
277
+ volumeSizeInBytes := scw .Size (uint64 (volumeSize .(int )) * gb )
278
+ req .RootVolumeSize = & volumeSizeInBytes
279
+ }
280
+
256
281
// check if the cluster is waiting for a pool
257
282
cluster , err := k8sAPI .GetCluster (& k8s.GetClusterRequest {
258
283
ClusterID : expandID (d .Get ("cluster_id" )),
0 commit comments