Reputation: 906
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?
Upvotes: 0
Views: 38
Reputation: 461
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",
});
Upvotes: 1