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 da7f5ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 6.1.1 (Jan 28, 2025)

FEATURES:

* Fixed creating nodegroup after changes ([#324](https://github.com/selectel/terraform-provider-selectel/pull/324))

## 6.1.0 (Jan 16, 2025)

FEATURES:
Expand Down
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 da7f5ad

Please sign in to comment.