IoT Hub endpoint for Service Bus Queue doesn't have a "Queue Name" property

I’m creating an IoT Hub that needs to route messages to a Service Bus Queue endpoint.

My problem is that I can’t find in the documentation where I inform the name of the queue.

I’m using the pages azurerm-iothub and azurerm_iothub_endpoint_servicebus_queue but none of these are clear as to where to put the queue name.

The argument reference for both iot hub endpoint block and the endpoint for service bus doesn’t have that property.

From the Portal I can see that the queue name is mandatory, so how should I inform it using Terraform?

This is the iot hub endpoint configuration that I’m using:

endpoint {
    type              = "AzureIotHub.ServiceBusQueue"
    connection_string = azurerm_servicebus_queue_authorization_rule.example.primary_connection_string
    name              = "endpoint-name"

And this is the endpoint for service bus:

resource "azurerm_iothub_endpoint_servicebus_queue" "default" {
  resource_group_name = "my-resources"
  iothub_name         = "my-iothub"
  name                = "endpoint-name"

  connection_string = azurerm_servicebus_queue_authorization_rule.example.primary_connection_string

It all seems that the connection_string is created with the queue information therefore not requiring explicit queue name when creating the endpoint.

This topic may be closed.

resource "azurerm_servicebus_queue_authorization_rule" "iothub-enqueue" {
  name                = "iothub-enqueue"
  namespace_name      =
  queue_name          = "<namf of the queue>"
  resource_group_name = "my-resources"

  listen = false
  send   = true
  manage = false