HybridConnection

Manages an App Service Hybrid Connection for an existing App Service, Relay and Service Bus.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "West Europe",
        });
        var examplePlan = new Azure.AppService.Plan("examplePlan", new Azure.AppService.PlanArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Sku = new Azure.AppService.Inputs.PlanSkuArgs
            {
                Tier = "Standard",
                Size = "S1",
            },
        });
        var exampleAppService = new Azure.AppService.AppService("exampleAppService", new Azure.AppService.AppServiceArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            AppServicePlanId = examplePlan.Id,
        });
        var exampleNamespace = new Azure.Relay.Namespace("exampleNamespace", new Azure.Relay.NamespaceArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            SkuName = "Standard",
        });
        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 = exampleHybridConnection.Id,
            Hostname = "testhostname.example",
            Port = 8080,
            SendKeyName = "exampleSharedAccessKey",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/appservice"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/relay"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
            Location: pulumi.String("West Europe"),
        })
        if err != nil {
            return err
        }
        examplePlan, err := appservice.NewPlan(ctx, "examplePlan", &appservice.PlanArgs{
            Location:          exampleResourceGroup.Location,
            ResourceGroupName: exampleResourceGroup.Name,
            Sku: &appservice.PlanSkuArgs{
                Tier: pulumi.String("Standard"),
                Size: pulumi.String("S1"),
            },
        })
        if err != nil {
            return err
        }
        exampleAppService, err := appservice.NewAppService(ctx, "exampleAppService", &appservice.AppServiceArgs{
            Location:          exampleResourceGroup.Location,
            ResourceGroupName: exampleResourceGroup.Name,
            AppServicePlanId:  examplePlan.ID(),
        })
        if err != nil {
            return err
        }
        exampleNamespace, err := relay.NewNamespace(ctx, "exampleNamespace", &relay.NamespaceArgs{
            Location:          exampleResourceGroup.Location,
            ResourceGroupName: exampleResourceGroup.Name,
            SkuName:           pulumi.String("Standard"),
        })
        if err != nil {
            return err
        }
        exampleHybridConnection, err := relay.NewHybridConnection(ctx, "exampleHybridConnection", &relay.HybridConnectionArgs{
            ResourceGroupName:  exampleResourceGroup.Name,
            RelayNamespaceName: exampleNamespace.Name,
            UserMetadata:       pulumi.String("examplemetadata"),
        })
        if err != nil {
            return err
        }
        _, err = appservice.NewHybridConnection(ctx, "exampleAppservice/hybridConnectionHybridConnection", &appservice.HybridConnectionArgs{
            AppServiceName:    exampleAppService.Name,
            ResourceGroupName: exampleResourceGroup.Name,
            RelayId:           exampleHybridConnection.ID(),
            Hostname:          pulumi.String("testhostname.example"),
            Port:              pulumi.Int(8080),
            SendKeyName:       pulumi.String("exampleSharedAccessKey"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku={
        "tier": "Standard",
        "size": "S1",
    })
example_app_service = azure.appservice.AppService("exampleAppService",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id)
example_namespace = azure.relay.Namespace("exampleNamespace",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku_name="Standard")
example_hybrid_connection = azure.relay.HybridConnection("exampleHybridConnection",
    resource_group_name=example_resource_group.name,
    relay_namespace_name=example_namespace.name,
    user_metadata="examplemetadata")
example_appservice_hybrid_connection_hybrid_connection = azure.appservice.HybridConnection("exampleAppservice/hybridConnectionHybridConnection",
    app_service_name=example_app_service.name,
    resource_group_name=example_resource_group.name,
    relay_id=example_hybrid_connection.id,
    hostname="testhostname.example",
    port=8080,
    send_key_name="exampleSharedAccessKey")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const examplePlan = new azure.appservice.Plan("examplePlan", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    sku: {
        tier: "Standard",
        size: "S1",
    },
});
const exampleAppService = new azure.appservice.AppService("exampleAppService", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    appServicePlanId: examplePlan.id,
});
const exampleNamespace = new azure.relay.Namespace("exampleNamespace", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    skuName: "Standard",
});
const exampleHybridConnection = new azure.relay.HybridConnection("exampleHybridConnection", {
    resourceGroupName: exampleResourceGroup.name,
    relayNamespaceName: exampleNamespace.name,
    userMetadata: "examplemetadata",
});
const exampleAppservice_hybridConnectionHybridConnection = new azure.appservice.HybridConnection("exampleAppservice/hybridConnectionHybridConnection", {
    appServiceName: exampleAppService.name,
    resourceGroupName: exampleResourceGroup.name,
    relayId: exampleHybridConnection.id,
    hostname: "testhostname.example",
    port: 8080,
    sendKeyName: "exampleSharedAccessKey",
});

Create a HybridConnection Resource

def HybridConnection(resource_name, opts=None, app_service_name=None, hostname=None, port=None, relay_id=None, resource_group_name=None, send_key_name=None, __props__=None);
name string
The unique name of the resource.
args HybridConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args HybridConnectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args HybridConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

HybridConnection Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The HybridConnection resource accepts the following input properties:

AppServiceName string

Specifies the name of the App Service. Changing this forces a new resource to be created.

Hostname string

The hostname of the endpoint.

Port int

The port of the endpoint.

RelayId string

The Resource ID of Service Bus relay. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

SendKeyName string

The name of the Service Bus key.

AppServiceName string

Specifies the name of the App Service. Changing this forces a new resource to be created.

Hostname string

The hostname of the endpoint.

Port int

The port of the endpoint.

RelayId string

The Resource ID of Service Bus relay. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

SendKeyName string

The name of the Service Bus key.

appServiceName string

Specifies the name of the App Service. Changing this forces a new resource to be created.

hostname string

The hostname of the endpoint.

port number

The port of the endpoint.

relayId string

The Resource ID of Service Bus relay. Changing this forces a new resource to be created.

resourceGroupName string

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

sendKeyName string

The name of the Service Bus key.

app_service_name str

Specifies the name of the App Service. Changing this forces a new resource to be created.

hostname str

The hostname of the endpoint.

port float

The port of the endpoint.

relay_id str

The Resource ID of Service Bus relay. Changing this forces a new resource to be created.

resource_group_name str

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

send_key_name str

The name of the Service Bus key.

Outputs

All input properties are implicitly available as output properties. Additionally, the HybridConnection resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
NamespaceName string

The name of the Relay Namespace.

RelayName string
SendKeyValue string

The value of the Service Bus Primary Access key.

ServiceBusNamespace string

The name of the Service Bus namespace.

ServiceBusSuffix string

The suffix for the service bus endpoint.

Id string
The provider-assigned unique ID for this managed resource.
NamespaceName string

The name of the Relay Namespace.

RelayName string
SendKeyValue string

The value of the Service Bus Primary Access key.

ServiceBusNamespace string

The name of the Service Bus namespace.

ServiceBusSuffix string

The suffix for the service bus endpoint.

id string
The provider-assigned unique ID for this managed resource.
namespaceName string

The name of the Relay Namespace.

relayName string
sendKeyValue string

The value of the Service Bus Primary Access key.

serviceBusNamespace string

The name of the Service Bus namespace.

serviceBusSuffix string

The suffix for the service bus endpoint.

id str
The provider-assigned unique ID for this managed resource.
namespace_name str

The name of the Relay Namespace.

relay_name str
send_key_value str

The value of the Service Bus Primary Access key.

service_bus_namespace str

The name of the Service Bus namespace.

service_bus_suffix str

The suffix for the service bus endpoint.

Look up an Existing HybridConnection Resource

Get an existing HybridConnection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: HybridConnectionState, opts?: CustomResourceOptions): HybridConnection
static get(resource_name, id, opts=None, app_service_name=None, hostname=None, namespace_name=None, port=None, relay_id=None, relay_name=None, resource_group_name=None, send_key_name=None, send_key_value=None, service_bus_namespace=None, service_bus_suffix=None, __props__=None);
func GetHybridConnection(ctx *Context, name string, id IDInput, state *HybridConnectionState, opts ...ResourceOption) (*HybridConnection, error)
public static HybridConnection Get(string name, Input<string> id, HybridConnectionState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AppServiceName string

Specifies the name of the App Service. Changing this forces a new resource to be created.

Hostname string

The hostname of the endpoint.

NamespaceName string

The name of the Relay Namespace.

Port int

The port of the endpoint.

RelayId string

The Resource ID of Service Bus relay. Changing this forces a new resource to be created.

RelayName string
ResourceGroupName string

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

SendKeyName string

The name of the Service Bus key.

SendKeyValue string

The value of the Service Bus Primary Access key.

ServiceBusNamespace string

The name of the Service Bus namespace.

ServiceBusSuffix string

The suffix for the service bus endpoint.

AppServiceName string

Specifies the name of the App Service. Changing this forces a new resource to be created.

Hostname string

The hostname of the endpoint.

NamespaceName string

The name of the Relay Namespace.

Port int

The port of the endpoint.

RelayId string

The Resource ID of Service Bus relay. Changing this forces a new resource to be created.

RelayName string
ResourceGroupName string

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

SendKeyName string

The name of the Service Bus key.

SendKeyValue string

The value of the Service Bus Primary Access key.

ServiceBusNamespace string

The name of the Service Bus namespace.

ServiceBusSuffix string

The suffix for the service bus endpoint.

appServiceName string

Specifies the name of the App Service. Changing this forces a new resource to be created.

hostname string

The hostname of the endpoint.

namespaceName string

The name of the Relay Namespace.

port number

The port of the endpoint.

relayId string

The Resource ID of Service Bus relay. Changing this forces a new resource to be created.

relayName string
resourceGroupName string

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

sendKeyName string

The name of the Service Bus key.

sendKeyValue string

The value of the Service Bus Primary Access key.

serviceBusNamespace string

The name of the Service Bus namespace.

serviceBusSuffix string

The suffix for the service bus endpoint.

app_service_name str

Specifies the name of the App Service. Changing this forces a new resource to be created.

hostname str

The hostname of the endpoint.

namespace_name str

The name of the Relay Namespace.

port float

The port of the endpoint.

relay_id str

The Resource ID of Service Bus relay. Changing this forces a new resource to be created.

relay_name str
resource_group_name str

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

send_key_name str

The name of the Service Bus key.

send_key_value str

The value of the Service Bus Primary Access key.

service_bus_namespace str

The name of the Service Bus namespace.

service_bus_suffix str

The suffix for the service bus endpoint.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.