Azure Messaging Signalr Service
This page shows how to write Terraform and Azure Resource Manager for Messaging Signalr Service and write them securely.
azurerm_signalr_service (Terraform)
The Signalr Service in Messaging can be configured in Terraform with the resource name azurerm_signalr_service. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_signalr_service" "example" {
name = var.signalr_name
location = var.location
resource_group_name = azurerm_resource_group.rg.name
sku {
resource "azurerm_signalr_service" "vh" {
name = var.resource_prefix
resource_group_name = data.azurerm_resource_group.vh-core-infra.name
location = "uksouth"
sku {
resource "azurerm_signalr_service" "vh" {
name = var.resource_prefix
resource_group_name = data.azurerm_resource_group.vh-core-infra.name
location = "uksouth"
sku {
resource "azurerm_signalr_service" "serverless_signalr" {
name = "serverlesspoc-signalr"
location = azurerm_resource_group.serverless-group.location
resource_group_name = azurerm_resource_group.serverless-group.name
sku {
resource "azurerm_signalr_service" "signalr" {
name = var.name
location = var.location
resource_group_name = var.resource_group
sku {
resource "azurerm_signalr_service" "signalr" {
location = var.location
name = local.signalr_name
resource_group_name = azurerm_resource_group.group.name
sku {
resource "azurerm_signalr_service" "vh" {
name = var.resource_prefix
resource_group_name = data.azurerm_resource_group.vh-infra-core.name
location = data.azurerm_resource_group.vh-infra-core.location
sku {
resource "azurerm_signalr_service" "signalr" {
location = var.location
name = local.name
resource_group_name = var.resource_group_name
sku {
capacity = var.sku.capacity
resource "azurerm_signalr_service" "signalr" {
name = var.signalr_name
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
sku {
resource "azurerm_signalr_service" "this" {
location = var.location
name = var.name
resource_group_name = var.resource_group_name
tags = var.tags
Parameters
-
hostnameoptional computed - string -
idoptional computed - string -
ip_addressoptional computed - string -
locationrequired - string -
namerequired - string -
primary_access_keyoptional computed - string -
primary_connection_stringoptional computed - string -
public_portoptional computed - number -
resource_group_namerequired - string -
secondary_access_keyoptional computed - string -
secondary_connection_stringoptional computed - string -
server_portoptional computed - number -
tagsoptional - map from string to string -
corslist block-
allowed_originsrequired - set of string
-
-
featuresset block -
skulist block -
timeoutssingle block -
upstream_endpointset block-
category_patternrequired - list of string -
event_patternrequired - list of string -
hub_patternrequired - list of string -
url_templaterequired - string
-
Explanation in Terraform Registry
Manages an Azure SignalR service.
Microsoft.SignalRService/signalR (Azure Resource Manager)
The signalR in Microsoft.SignalRService can be configured in Azure Resource Manager with the resource name Microsoft.SignalRService/signalR. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
apiVersionrequired - stringidentityoptionaltypeoptional - stringuserAssignedIdentitiesoptional - undefinedGet or set the user assigned identities
kindoptional - stringlocationoptional - stringThe GEO location of the resource. e.g. West US | East US | North Central US | South Central US.
namerequired - stringThe name of the resource.
propertiesrequiredcorsoptionalallowedOriginsoptional - arrayGets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. If omitted, allow all by default.
disableAadAuthoptional - booleanDisableLocalAuth Enable or disable aad auth When set as true, connection with AuthType=aad won't work.
disableLocalAuthoptional - booleanDisableLocalAuth Enable or disable local auth with AccessKey When set as true, connection with AccessKey=xxx won't work.
featuresoptional arrayflagrequired - stringpropertiesoptional - stringOptional properties related to this feature.
valuerequired - stringValue of the feature flag. See Azure SignalR service document https://docs.microsoft.com/azure/azure-signalr/ for allowed values.
networkACLsoptionaldefaultActionoptional - stringprivateEndpointsoptional arrayallowoptional - arrayAllowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
denyoptional - arrayDenied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
namerequired - stringName of the private endpoint connection
publicNetworkoptionalallowoptional - arrayAllowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
denyoptional - arrayDenied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
publicNetworkAccessoptional - stringEnable or disable public network access. Default to "Enabled". When it's Enabled, network ACLs still apply. When it's Disabled, public network access is always disabled no matter what you set in network ACLs.
resourceLogConfigurationoptionalcategoriesoptional arrayenabledoptional - stringIndicates whether or the resource log category is enabled. Available values: true, false. Case insensitive.
nameoptional - stringGets or sets the resource log category's name. Available values: ConnectivityLogs, MessagingLogs. Case insensitive.
tlsoptionalclientCertEnabledoptional - booleanRequest client certificate during TLS handshake if enabled
upstreamoptionaltemplatesoptional arrayauthoptionalmanagedIdentityoptionalresourceoptional - stringThe Resource indicating the App ID URI of the target resource. It also appears in the aud (audience) claim of the issued token.
typeoptional - string
categoryPatternoptional - stringGets or sets the matching pattern for category names. If not set, it matches any category. There are 3 kind of patterns supported: 1. "*", it to matches any category name 2. Combine multiple categories with ",", for example "connections,messages", it matches category "connections" and "messages" 3. The single category name, for example, "connections", it matches the category "connections"
eventPatternoptional - stringGets or sets the matching pattern for event names. If not set, it matches any event. There are 3 kind of patterns supported: 1. "*", it to matches any event name 2. Combine multiple events with ",", for example "connect,disconnect", it matches event "connect" and "disconnect" 3. The single event name, for example, "connect", it matches "connect"
hubPatternoptional - stringGets or sets the matching pattern for hub names. If not set, it matches any hub. There are 3 kind of patterns supported: 1. "*", it to matches any hub name 2. Combine multiple hubs with ",", for example "hub1,hub2", it matches "hub1" and "hub2" 3. The single hub name, for example, "hub1", it matches "hub1"
urlTemplaterequired - stringGets or sets the Upstream URL template. You can use 3 predefined parameters {hub}, {category} {event} inside the template, the value of the Upstream URL is dynamically calculated when the client request comes in. For example, if the urlTemplate is
http://example.com/{hub}/api/{event}, with a client request from hubchatconnects, it will first POST to this URL:http://example.com/chat/api/connect.
skuoptionalcapacityoptional - integerOptional, integer. The unit count of the resource. 1 by default.
If present, following values are allowed: Free: 1 Standard: 1,2,5,10,20,50,100
namerequired - stringThe name of the SKU. Required.
Allowed values: Standard_S1, Free_F1
tieroptional - string
tagsoptional - stringTags of the service which is a list of key value pairs that describe the resource.
typerequired - string
Frequently asked questions
What is Azure Messaging Signalr Service?
Azure Messaging Signalr Service is a resource for Messaging of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Messaging Signalr Service?
For Terraform, the Manuss20/trackmverse, hmcts/vh-core-infra and hmcts/vh-core-infra-sds source code examples are useful. See the Terraform Example section for further details.