0

Trying to integrate my azure signalr service with a private endpoint, the below is the sample terraform code that I'm trying

resource "azurerm_private_endpoint" "example" {
  name                 = "${var.prefix}-signalr"
  location             = azurerm_resource_group.example.location
  resource_group_name  = azurerm_resource_group.example.name
  subnet_id            = azurerm_subnet.endpoint.id

  private_service_connection {
    name                           = "tfex-signalr-connection"
    is_manual_connection           = false
    private_connection_resource_id = azurerm_signalr.example.id
    subresource_names              = ["signalR"]
  }
}

When I'm running it, terraform init/plan is getting succeed , however while applying it failed with the below error

creating Private Endpoint "signalr-02-privateendpoint" (Resource Group "app-services-windows-rg-01"): network.PrivateEndpointsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="BadArgument" Message="Call to Microsoft.SignalRService/SignalR failed. Error message: Invalid groupId" Details=[]

on ../../../common/private-endpoint/main.tf line 7, in resource "azurerm_private_endpoint" "generice_private_endpoint": 7: resource "azurerm_private_endpoint" "generice_private_endpoint" {

Already created a GitHub issue but want to reach other community members whether they faced this issue/ how to overcome this error

Jayendran
  • 9,638
  • 8
  • 60
  • 103

1 Answers1

1

After my validation, you could change to use signalr instead of signalR in your code.

subresource_names = ["signalr"]

enter image description here

Nancy
  • 26,865
  • 3
  • 18
  • 34
  • wow its worked , the reason I put *R* i followed the official [Microsoft article](https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview#private-link-resource) I'm going to raise a PR to fix this issue so that it will not affect others. Thanks again ! – Jayendran May 24 '21 at 09:19