Skip to content

Commit

Permalink
Add fix for creating nodegroup after fixing in selectel#324
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Minasyan committed Jan 28, 2025
1 parent 99e1d5a commit b9d2ff1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions selectel/resource_selectel_mks_nodegroup_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,11 @@ func resourceMKSNodegroupV1Create(ctx context.Context, d *schema.ResourceData, m
Preemptible: &preemptible,
}

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

projectQuotas, _, err := quotas.GetProjectQuotas(selvpcClient, projectID, region)
Expand Down

0 comments on commit b9d2ff1

Please sign in to comment.