Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added requested changes
  • Loading branch information
djryanj committed Oct 17, 2025
commit 66c7d160b3071bd6df9e04ddac30a685261b5ef7
8 changes: 0 additions & 8 deletions internal/services/search/search_service_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package search

import (
"context"
"errors"
"fmt"
"log"
"strings"
Expand Down Expand Up @@ -289,10 +288,6 @@ func resourceSearchServiceCreate(d *pluginsdk.ResourceData, meta interface{}) er
return err
}

if !localAuthenticationEnabled && authenticationFailureMode != "" {
return errors.New("'authentication_failure_mode' cannot be defined if 'local_authentication_enabled' has been set to 'false'")
}

// API Only Mode (Default) (e.g. localAuthenticationEnabled = true)...
authenticationOptions := pointer.To(services.DataPlaneAuthOptions{
ApiKeyOnly: pointer.To(apiKeyOnly),
Expand Down Expand Up @@ -444,9 +439,6 @@ func resourceSearchServiceUpdate(d *pluginsdk.ResourceData, meta interface{}) er
if d.HasChanges("authentication_failure_mode", "local_authentication_enabled") {
authenticationFailureMode := d.Get("authentication_failure_mode").(string)
localAuthenticationEnabled := d.Get("local_authentication_enabled").(bool)
if !localAuthenticationEnabled && authenticationFailureMode != "" {
return fmt.Errorf("'authentication_failure_mode' cannot be defined if 'local_authentication_enabled' has been set to 'false'")
}

var apiKeyOnly interface{} = make(map[string]interface{}, 0)

Expand Down
4 changes: 4 additions & 0 deletions internal/services/search/search_service_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@ func TestAccSearchService_apiAccessControlUpdate(t *testing.T) {
),
},
data.ImportStep(),
{
Config: r.apiAccessControlBoth(data, false, "http401WithBearerChallenge"),
ExpectError: regexp.MustCompile("cannot be defined"),
},
{
Config: r.basic(data, "standard"),
Check: acceptance.ComposeTestCheckFunc(
Expand Down
Loading