Skip to content

Commit

Permalink
[MKS-4439]Add checking local_volume with volume_type
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Minasyan committed Oct 11, 2024
1 parent 4b87dd2 commit 620ac14
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion selectel/resource_selectel_mks_nodegroup_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ func resourceMKSNodegroupV1() *schema.Resource {
},
"volume_type": {
Type: schema.TypeString,
ConflictsWith: []string{"local_volume"},
Optional: true,
ForceNew: true,
},
Expand Down Expand Up @@ -256,6 +255,10 @@ func resourceMKSNodegroupV1Create(ctx context.Context, d *schema.ResourceData, m
InstallNvidiaDevicePlugin: &installNvidiaDevicePlugin,
}

if createOpts.VolumeType != "" && !createOpts.LocalVolume {
return diag.FromErr(fmt.Errorf("can't use volume_type with local_volume: %w", err))
}

projectQuotas, _, err := quotas.GetProjectQuotas(selvpcClient, projectID, region)
if err != nil {
return diag.FromErr(errGettingObject(objectProjectQuotas, projectID, err))
Expand Down

0 comments on commit 620ac14

Please sign in to comment.