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
new HybridConnection(name: string, args: HybridConnectionArgs, opts?: CustomResourceOptions);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);func NewHybridConnection(ctx *Context, name string, args HybridConnectionArgs, opts ...ResourceOption) (*HybridConnection, error)public HybridConnection(string name, HybridConnectionArgs args, CustomResourceOptions? opts = null)- 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:
- App
Service stringName 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.
- Relay
Id string The Resource ID of Service Bus relay. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.
- Send
Key stringName The name of the Service Bus key.
- App
Service stringName 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.
- Relay
Id string The Resource ID of Service Bus relay. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.
- Send
Key stringName The name of the Service Bus key.
- app
Service stringName 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.
- relay
Id string The Resource ID of Service Bus relay. Changing this forces a new resource to be created.
- resource
Group stringName The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.
- send
Key stringName The name of the Service Bus key.
- app_
service_ strname 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_ strname The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.
- send_
key_ strname 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.
- Namespace
Name string The name of the Relay Namespace.
- Relay
Name string - Send
Key stringValue The value of the Service Bus Primary Access key.
- Service
Bus stringNamespace The name of the Service Bus namespace.
- Service
Bus stringSuffix The suffix for the service bus endpoint.
- Id string
- The provider-assigned unique ID for this managed resource.
- Namespace
Name string The name of the Relay Namespace.
- Relay
Name string - Send
Key stringValue The value of the Service Bus Primary Access key.
- Service
Bus stringNamespace The name of the Service Bus namespace.
- Service
Bus stringSuffix The suffix for the service bus endpoint.
- id string
- The provider-assigned unique ID for this managed resource.
- namespace
Name string The name of the Relay Namespace.
- relay
Name string - send
Key stringValue The value of the Service Bus Primary Access key.
- service
Bus stringNamespace The name of the Service Bus namespace.
- service
Bus stringSuffix 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_ strvalue The value of the Service Bus Primary Access key.
- service_
bus_ strnamespace The name of the Service Bus namespace.
- service_
bus_ strsuffix 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): HybridConnectionstatic 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:
- App
Service stringName Specifies the name of the App Service. Changing this forces a new resource to be created.
- Hostname string
The hostname of the endpoint.
- Namespace
Name string The name of the Relay Namespace.
- Port int
The port of the endpoint.
- Relay
Id string The Resource ID of Service Bus relay. Changing this forces a new resource to be created.
- Relay
Name string - Resource
Group stringName The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.
- Send
Key stringName The name of the Service Bus key.
- Send
Key stringValue The value of the Service Bus Primary Access key.
- Service
Bus stringNamespace The name of the Service Bus namespace.
- Service
Bus stringSuffix The suffix for the service bus endpoint.
- App
Service stringName Specifies the name of the App Service. Changing this forces a new resource to be created.
- Hostname string
The hostname of the endpoint.
- Namespace
Name string The name of the Relay Namespace.
- Port int
The port of the endpoint.
- Relay
Id string The Resource ID of Service Bus relay. Changing this forces a new resource to be created.
- Relay
Name string - Resource
Group stringName The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.
- Send
Key stringName The name of the Service Bus key.
- Send
Key stringValue The value of the Service Bus Primary Access key.
- Service
Bus stringNamespace The name of the Service Bus namespace.
- Service
Bus stringSuffix The suffix for the service bus endpoint.
- app
Service stringName Specifies the name of the App Service. Changing this forces a new resource to be created.
- hostname string
The hostname of the endpoint.
- namespace
Name string The name of the Relay Namespace.
- port number
The port of the endpoint.
- relay
Id string The Resource ID of Service Bus relay. Changing this forces a new resource to be created.
- relay
Name string - resource
Group stringName The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.
- send
Key stringName The name of the Service Bus key.
- send
Key stringValue The value of the Service Bus Primary Access key.
- service
Bus stringNamespace The name of the Service Bus namespace.
- service
Bus stringSuffix The suffix for the service bus endpoint.
- app_
service_ strname 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_ strname The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.
- send_
key_ strname The name of the Service Bus key.
- send_
key_ strvalue The value of the Service Bus Primary Access key.
- service_
bus_ strnamespace The name of the Service Bus namespace.
- service_
bus_ strsuffix 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
azurermTerraform Provider.