azurermWebAppHybridConnection
Manages a Web App Hybrid Connection.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-rg",
}
);
const azurermServicePlanExample = new azurerm.servicePlan.ServicePlan(
this,
"example_2",
{
location: azurermResourceGroupExample.location,
name: "example-plan",
os_type: "Windows",
resource_group_name: azurermResourceGroupExample.name,
sku_name: "S1",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermServicePlanExample.overrideLogicalId("example");
const azurermWindowsWebAppExample = new azurerm.windowsWebApp.WindowsWebApp(
this,
"example_3",
{
location: azurermResourceGroupExample.location,
name: "example-web-app",
resource_group_name: azurermResourceGroupExample.name,
service_plan_id: azurermServicePlanExample.id,
site_config: [{}],
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermWindowsWebAppExample.overrideLogicalId("example");
const azurermRelayNamespaceExample = new azurerm.relayNamespace.RelayNamespace(
this,
"example_4",
{
location: azurermResourceGroupExample.location,
name: "example-relay",
resource_group_name: azurermResourceGroupExample.name,
sku_name: "Standard",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermRelayNamespaceExample.overrideLogicalId("example");
const azurermRelayHybridConnectionExample =
new azurerm.relayHybridConnection.RelayHybridConnection(this, "example_5", {
name: "examplerhc1",
relay_namespace_name: azurermRelayNamespaceExample.name,
resource_group_name: azurermResourceGroupExample.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermRelayHybridConnectionExample.overrideLogicalId("example");
const azurermWebAppHybridConnectionExample =
new azurerm.webAppHybridConnection.WebAppHybridConnection(this, "example_6", {
hostname: "myhostname.example",
port: 8081,
relay_id: azurermRelayHybridConnectionExample.id,
web_app_id: azurermWindowsWebAppExample.id,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermWebAppHybridConnectionExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
webAppId
- (Required) The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created. -
relayId
- (Required) The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created. -
hostname
- (Required) The hostname of the endpoint. -
port
- (Required) The port to use for the endpoint.
sendKeyName
- (Optional) The name of the Relay key withsend
permission to use. Defaults torootManageSharedAccessKey
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
-
id
- The ID of the Web App Hybrid Connection -
namespaceName
- The name of the Relay Namespace. -
relayName
- The name of the Relay in use. -
sendKeyValue
- The Primary Access Key for thesendKeyName
-
serviceBusNamespace
- The Service Bus Namespace. -
serviceBusSuffix
- The suffix for the endpoint.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Web App Hybrid Connection.update
- (Defaults to 30 minutes) Used when updating the Web App Hybrid Connection.read
- (Defaults to 5 minutes) Used when retrieving the Web App Hybrid Connection.delete
- (Defaults to 5 minutes) Used when deleting the Web App Hybrid Connection.
Import
a Web App Hybrid Connection can be imported using the resourceId
, e.g.