0

I have an existing App Service and an existing Hybrid Connection, I was able to get all the parameters I need to create a new Pulumi.Azure.AppService.HybridConnection but the RelayId,

            var webApiHybridConnection = new HybridConnection(
                    hybridConnectionName,
                    new Pulumi.Azure.AppService.HybridConnectionArgs
                    {
                        AppServiceName = appServiceName,
                        ResourceGroupName = resourceGroupName,
                        RelayId = "how do I find this value?",
                        Hostname = "somehost01.com",
                        Port = 443,
                        SendKeyName = $"{_nameSet.AppServiceName(new ServiceName(ServiceName))}-sk",
                    });

How can I find the RelayId using Pulumi.Azure, so I can assign the Hybrid Connection to my App Service?

1 Answer 1

1

I am not familiar with Azure Hybrid Connections, but from looking at the documentation I see a Azure.Relay.HybridConnection resource type that allows you to create a Relay HybridConnection to provide into a AppService HybridConnection.

Here's a snippet of the example from https://www.pulumi.com/docs/reference/pkg/azure/appservice/hybridconnection/#example-usage:

var exampleHybridConnection = new Azure.Relay.HybridConnection("exampleHybridConnection", new Azure.Relay.HybridConnectionArgs
{
    ResourceGroupName = exampleResourceGroup.Name,
    RelayNamespaceName = exampleNamespace.Name,
    UserMetadata = "examplemetadata",
});
var exampleAppservice_hybridConnectionHybridConnection = new Azure.AppService.HybridConnection("exampleAppservice/hybridConnectionHybridConnection", new Azure.AppService.HybridConnectionArgs
{
    AppServiceName = exampleAppService.Name,
    ResourceGroupName = exampleResourceGroup.Name,

    /**
     * RelayId from `new Azure.Relay.HybridConnection(...)`
     */
    RelayId = exampleHybridConnection.Id,

    Hostname = "testhostname.example",
    Port = 8080,
    SendKeyName = "exampleSharedAccessKey",
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.