How can I configure a hybrid connection in an app ...
# dotnet
f
How can I configure a hybrid connection in an app service, I have been trying to do this but I can’t figure out how to get the RelayId I created this post just in case you want to follow up https://stackoverflow.com/questions/64745249/how-to-find-existing-hybrid-connection-relayid-using-pulumi-azure
Copy code
var webApiHybridConnection = new HybridConnection(
    hybridConnectionName,
    new Pulumi.Azure.AppService.HybridConnectionArgs
    {
        AppServiceName = appServiceName,
        ResourceGroupName = resourceGroupName,
        RelayId = "what goes here?",
        Hostname = "",
        Port = 443,
        SendKeyName = $"{_nameSet.AppServiceName(new ServiceName(ServiceName))}-sk",
    });
t
Do you have a
Copy code
azure.relay.Namespace
? I would expect you need its
id
.
f
Yes
t
So did that ID work?
f
No.
I had to build it myself
Copy code
RelayId = $"/subscriptions/{subscriptionId}/resourceGroups/{hybridConnectionResourceGroupName}/providers/Microsoft.Relay/namespaces/{hybridConnectionNamespaceName}/hybridConnections/{hybridConnectionName}",