Azurerm_search_service error during apply

Hi all, I am using the azurerm v.3.92.0 to manage an Azure Search Service in three enviroments (threr different Resource Groups).
In two of them everything is ok, I can apply the configuration without problems.
When I use the third ResourceGroup, during the plan everything seems to be ok but when I run the apply I obtain the following error:

│ Search Service Name: "xxx"): performing CreateOrUpdate: unexpected status 400 with error: : The provided value for encryptionWithCmk.enforcement were invalid.
│ Parameter name: encryptionWithCmk

This is the configuration I use:

resource "azurerm_search_service" "main" {
  #Required
  name                = "xxx"
  resource_group_name = var.resource_group_name  
  location            = var.location
  sku                 = var.search_sku
  partition_count     = var.search_partition_count
  replica_count       = var.search_replica_count

  public_network_access_enabled = var.public_network_access_enabled
  
  identity {
    type = "SystemAssigned"
  }
  
  tags = var.resource_tags

  local_authentication_enabled = true
  authentication_failure_mode  = "http403"
}

My search index is not encrypted and, as you can see, in the configuration there is no reference to such capability.

Any help will be really apprecied :confused:

Thank you

The error is likely due to Azure expecting encryption settings due to policies or defaults, even if not defined in your Terraform code. Check Azure policies for encryption requirements, try explicitly setting encryption settings in Terraform, ensure your Terraform and AzureRM versions are up to date, and compare configurations across environments for differences. If the issue persists, consider reaching out to Azure support for more specific guidance.