Skip to content

Commit

Permalink
attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
RaynorChavez committed Dec 17, 2024
1 parent 611396d commit e132200
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions internal/provider/indices_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,17 @@ func (r *indicesResource) Create(ctx context.Context, req resource.CreateRequest
"numberOfReplicas": model.Settings.NumberOfReplicas.ValueInt64(),
"filterStringMaxLength": model.Settings.FilterStringMaxLength.ValueInt64(),
}
// Normalize values before creating
if model.Settings.ModelProperties != nil {
if model.Settings.ModelProperties.TrustRemoteCode.IsNull() {
model.Settings.ModelProperties.TrustRemoteCode = types.BoolValue(false)
}
}

if model.Settings.TreatUrlsAndPointersAsMedia.IsNull() {
model.Settings.TreatUrlsAndPointersAsMedia = types.BoolValue(false)
}

// Optional dictionary fields
if model.Settings.ModelProperties != nil {
modelPropertiesMap := map[string]interface{}{
Expand Down

0 comments on commit e132200

Please sign in to comment.