From 922e1bc99a3fcb00a6bd8ae7713a8d776427cb62 Mon Sep 17 00:00:00 2001 From: Artem Minasyan Date: Thu, 10 Oct 2024 17:37:57 +0300 Subject: [PATCH] [MKS-4439]Add checking local_volume with volume_type --- selectel/resource_selectel_mks_nodegroup_v1.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/selectel/resource_selectel_mks_nodegroup_v1.go b/selectel/resource_selectel_mks_nodegroup_v1.go index 141687ec..09f7a2d1 100644 --- a/selectel/resource_selectel_mks_nodegroup_v1.go +++ b/selectel/resource_selectel_mks_nodegroup_v1.go @@ -256,6 +256,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))