Azure App Service (Web Apps) Hybrid Connection
This page shows how to write Terraform for App Service (Web Apps) Hybrid Connection and write them securely.
azurerm_app_service_hybrid_connection (Terraform)
The Hybrid Connection in App Service (Web Apps) can be configured in Terraform with the resource name azurerm_app_service_hybrid_connection
. The following sections describe 2 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_app_service_hybrid_connection" "hc_app" {
app_service_name = azurerm_app_service.example.name
resource_group_name = "resource_group"
relay_id = azurerm_relay_hybrid_connection.hc.id
hostname = "hostname"
port = 8080
resource "azurerm_app_service_hybrid_connection" "example" {
app_service_name = module.app_service.azurerm_app_service.example.name
resource_group_name = module.resource_group.azurerm_resource_group.example.name
relay_id = azurerm_relay_hybrid_connection.example.id
hostname = var.hostname
port = var.port
Parameters
-
app_service_name
required - string -
hostname
required - string -
id
optional computed - string -
namespace_name
optional computed - string -
port
required - number -
relay_id
required - string -
relay_name
optional computed - string -
resource_group_name
required - string -
send_key_name
optional - string -
send_key_value
optional computed - string -
service_bus_namespace
optional computed - string -
service_bus_suffix
optional computed - string -
timeouts
single block
Explanation in Terraform Registry
Manages an App Service Hybrid Connection for an existing App Service, Relay and Service Bus.
Tips: Best Practices for The Other Azure App Service (Web Apps) Resources
In addition to the azurerm_app_service, Azure App Service (Web Apps) has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.
azurerm_app_service
Ensure your App Service is accessible via HTTPS only
It is better to configure the App Service to be accessible via HTTPS only. By default, both HTTP and HTTPS are available.
azurerm_function_app
Ensure to enable authentication to prevent anonymous request being accepted
It is better to enable authentication to prevent anonymous requests and ensure all communications in the application are authenticated.
Azure Resource Manager Example
Azure Resource Manager code does not have the related resource.
Frequently asked questions
What is Azure App Service (Web Apps) Hybrid Connection?
Azure App Service (Web Apps) Hybrid Connection is a resource for App Service (Web Apps) of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure App Service (Web Apps) Hybrid Connection?
For Terraform, the dmaxim/wimc-net and VentsislavDinev/en_sample source code examples are useful. See the Terraform Example section for further details.