Skip to content

Commit bfc7022

Browse files
author
Michal Kopczynski
committed
improve
1 parent f8397c8 commit bfc7022

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

castai/resource_commitments.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ func resourceCommitments() *schema.Resource {
228228
"auto_assignment": {
229229
Type: schema.TypeBool,
230230
Optional: true,
231-
Description: "If enabled, the commitment is automatically assigned to all clusters in the matching region. When disabled, only explicitly listed cluster assignments are used. Defaults to true for new commitments if not specified.",
231+
Default: true,
232+
Description: "If enabled, the commitment is automatically assigned to all clusters in the matching region. When disabled, only explicitly listed cluster assignments are used.",
232233
},
233234
}),
234235
},

castai/resource_commitments_mapping.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ import (
99
"strings"
1010
"time"
1111

12-
"github.com/samber/lo"
1312
"slices"
1413

14+
"github.com/samber/lo"
15+
1516
"github.com/castai/terraform-provider-castai/castai/reservations"
1617
"github.com/castai/terraform-provider-castai/castai/sdk"
1718
)
@@ -512,6 +513,7 @@ func mapCommitmentImportWithConfigToUpdateRequest(
512513
Prioritization: c.Commitment.Prioritization,
513514
Status: c.Commitment.Status,
514515
ScalingStrategy: c.Commitment.ScalingStrategy,
516+
AutoAssignment: c.Commitment.AutoAssignment,
515517
}
516518
if c.Config != nil {
517519
if c.Config.AllowedUsage != nil {

0 commit comments

Comments
 (0)