SiteNameError returned when creating Azure DirectLine channe

Hi,

I’m getting the following error when applying my terraform plan (via the workspace portal UI):

Error: creating Directline Channel for Bot "data-pipelinesharedbotchannels" (Resource Group "data-pipeline-shared"): botservice.ChannelsClient#Create: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="SiteNameError" Message="DirectLine Channel siteName cannot be null or empty"

I was able to reproduce the same error on another project locally, using terraform CLI

The “terraform plan” output shows that the “name” attribute in the “Site” block is not null/empty i.e. has a value of “default”

This is the current config I have for creating the azure resources:

resource "azurerm_bot_channels_registration" "channels_registration" {
  name                       = local.bot_channels_name
  location                   = "global"
  resource_group_name        = azurerm_resource_group.shared_rg.name
  sku                        = "F0"
  microsoft_app_id           = var.bot_services_microsoft_id
  endpoint                   = local.bot_channels_endpoint
  icon_url                   = "https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png"
}

resource "azurerm_bot_channel_directline" "directline_channel" {
  bot_name            = azurerm_bot_channels_registration.channels_registration.name
  location            = azurerm_bot_channels_registration.channels_registration.location
  resource_group_name = azurerm_resource_group.shared_rg.name

  site {
    name    = "default"
    enabled = true
  }
}

I’ve been searching across the net with regards to this error and its resolution but haven’t come across any as yet. If anyone has any idea what could be causing this, please let me know.

Thanks!