This terraform module creates an Azure SignalR service and its associated Network Rules when needed. Diagnostic settings are also deployed.
Module version | Terraform version | OpenTofu version | AzureRM version |
---|---|---|---|
>= 8.x.x | Unverified | 1.8.x | >= 4.0 |
>= 7.x.x | 1.3.x | >= 3.0 | |
>= 6.x.x | 1.x | >= 3.0 | |
>= 5.x.x | 0.15.x | >= 2.0 | |
>= 4.x.x | 0.13.x / 0.14.x | >= 2.0 | |
>= 3.x.x | 0.12.x | >= 2.0 | |
>= 2.x.x | 0.12.x | < 2.0 | |
< 2.x.x | 0.11.x | < 2.0 |
If you want to contribute to this repository, feel free to use our pre-commit git hook configuration which will help you automatically update and format some files for you by enforcing our Terraform code module best-practices.
More details are available in the CONTRIBUTING.md file.
This module is optimized to work with the Claranet terraform-wrapper tool
which set some terraform variables in the environment needed by this module.
More details about variables set by the terraform-wrapper
available in the documentation.
module "signalr" {
source = "claranet/signalr/azurerm"
version = "x.x.x"
client_name = var.client_name
environment = var.environment
stack = var.stack
location = module.azure_region.location
location_short = module.azure_region.location_short
resource_group_name = module.rg.name
sku = {
name = "Standard_S1"
capacity = 1
}
allowed_request_types = ["ClientConnection"]
logs_destinations_ids = [
module.logs.id,
module.logs.storage_account_id,
]
}
Name | Version |
---|---|
azurecaf | ~> 1.2.28 |
azurerm | ~> 4.0 |
Name | Source | Version |
---|---|---|
diagnostics | claranet/diagnostic-settings/azurerm | ~> 8.0.0 |
Name | Type |
---|---|
azurerm_signalr_service.main | resource |
azurerm_signalr_service_network_acl.main | resource |
azurecaf_name.signalr | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
allowed_origins | A List of origins which should be able to make cross-origin calls. | list(string) |
[] |
no |
allowed_request_types | The allowed request types for the public network. Possible values are ClientConnection , ServerConnection , RESTAPI and Trace . When default_action is Allow , allowed_request_types cannot be set. |
list(string) |
null |
no |
client_name | Client name/account used in naming. | string |
n/a | yes |
custom_name | Custom name for the SignalR service, generated if not set. | string |
"" |
no |
default_action | The default action to control the network access when no other rule matches. Possible values are Allow and Deny . |
string |
"Deny" |
no |
default_tags_enabled | Option to enable or disable default tags. | bool |
true |
no |
denied_request_types | The denied request types for the public network. Possible values are ClientConnection , ServerConnection , RESTAPI and Trace . When default_action is Deny , denied_request_types cannot be set. |
list(string) |
null |
no |
diagnostic_settings_custom_name | Custom name of the diagnostics settings, name will be default if not set. |
string |
"default" |
no |
environment | Project environment. | string |
n/a | yes |
extra_tags | Additional tags to associate with your autoscale setting. | map(string) |
null |
no |
live_trace | Specifies if Live Trace is enabled or not. | object({ |
{} |
no |
location | Azure location for App Service Plan. | string |
n/a | yes |
location_short | Short string for Azure location. | string |
n/a | yes |
logs_categories | Log categories to send to destinations. | list(string) |
null |
no |
logs_destinations_ids | List of destination resources IDs for logs diagnostic destination. Can be Storage Account , Log Analytics Workspace and Event Hub . No more than one of each can be set.If you want to use Azure EventHub as a destination, you must provide a formatted string containing both the EventHub Namespace authorization send ID and the EventHub name (name of the queue to use in the Namespace) separated by the | character. |
list(string) |
n/a | yes |
logs_metrics_categories | Metrics categories to send to destinations. | list(string) |
null |
no |
name_prefix | Optional prefix for the generated name. | string |
"" |
no |
name_suffix | Optional suffix for the generated name. | string |
"" |
no |
private_endpoint_allowed_request_types | The allowed request types for the Private Endpoint Connection. Possible values are ClientConnection , ServerConnection , RESTAPI and Trace . When default_action is Allow , allowed_request_types cannot be set. |
list(string) |
null |
no |
private_endpoint_denied_request_types | The denied request types for the Private Endpoint Connection. Possible values are ClientConnection , ServerConnection , RESTAPI and Trace . When default_action is Deny , denied_request_types cannot be set. |
list(string) |
null |
no |
private_endpoint_id | The ID of the Private Endpoint. | string |
null |
no |
public_network_access_enabled | Specifies if the public access is enabled or not. | bool |
false |
no |
resource_group_name | Resource group name. | string |
n/a | yes |
service_mode | Specifies the service mode. | string |
"Default" |
no |
sku | SignalR SKU. | object({ |
{ |
no |
stack | Project stack name. | string |
n/a | yes |
upstream_endpoint | Specifies the upstream endpoint for SignalR. For arguements please refer to documentation. | object({ |
null |
no |
Name | Description |
---|---|
hostname | The FQDN of the SignalR service. |
id | The ID of the SignalR service. |
module_diagnostics | Diagnostics settings module outputs. |
primary_access_key | The primary access key for the SignalR service. |
primary_connection_string | The primary connection string for the SignalR service. |
public_port | The publicly accessible port of the SignalR service which is designed for browser/client use. |
resource | Azure SignalR service object. |
secondary_access_key | The secondary access key for the SignalR service. |
secondary_connection_string | The secondary connection string for the SignalR service. |
server_port | The publicly accessible port of the SignalR service which is designed for customer server side use. |