Search code examples
azureterraformdevopssignalr-hub

retrieving the primary_connection_string from azure signalr using terraform


One of the things we are not able to solve is how to retrieve the primary connection string from the azure signal r service (which is commissioned through terraform) and we can perfectly access it in the portal.

We expect to be able to access the primary connection string with the following command

output "signalr_primary_connection_string" {
value = "${azurerm_signalr_service.projectx.primary_connection_string}"
}

The resource was created as

resource "azurerm_signalr_service" "projectx" {
  name                = "xx-projectx-signalr"
  location            = "${var.region}"
  resource_group_name = "${azurerm_resource_group.OnePoc.name }"
  sku {
    name     = "Standard_S1"
    capacity = 1
  }
}

It looks from the documentation that we should be able to retrieve this and I need it to wire it to a function otherwise we are not having automation


Solution

  • You can access it like you try to (proof). You just need to update to the latest azure provider (1.22) version. This capability was released 4 days ago.