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 "azure_region" {
source = "claranet/regions/azurerm"
version = "x.x.x"
azure_region = var.azure_region
}
module "rg" {
source = "claranet/rg/azurerm"
version = "x.x.x"
location = module.azure_region.location
client_name = var.client_name
environment = var.environment
stack = var.stack
}
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.resource_group_name
sku = {
name = "Standard_S1"
capacity = 1
}
network_rules = [
{
name = "AllowClientConnection"
rule_type = "allow"
endpoint = "public-network"
services = ["ClientConnection"]
},
{
name = "DenyAllOthers"
rule_type = "deny"
endpoint = "public-network"
services = ["ServerConnection", "RESTAPI"]
}
]
}
Name | Version |
---|---|
azurecaf | ~> 1.2, >= 1.2.22 |
azurerm | >= 3.58 |
null | >= 2.0 |
No modules.
Name | Type |
---|---|
azurerm_signalr_service.signalr | resource |
null_resource.signalr_rule | resource |
azurecaf_name.signalr | data source |
azurerm_subscription.current | 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 |
client_name | Client name | string |
n/a | yes |
connectivity_logs_enabled | Specifies if Connectivity Logs are enabled or not | bool |
false |
no |
custom_name | Custom name for signalr service. Autogenerated if not set. | string |
null |
no |
default_tags_enabled | Option to enable or disable default tags | bool |
true |
no |
environment | Environment name | string |
n/a | yes |
extra_tags | Tags to add to the resource | map(string) |
null |
no |
live_trace_enabled | Specifies if Live Trace is enabled or not | bool |
false |
no |
location | Azure location for App Service Plan. | string |
n/a | yes |
location_short | Short string for Azure location. | string |
n/a | yes |
messaging_logs_enabled | Specifies if Messaging Logs are enabled or not | bool |
false |
no |
name_prefix | Optional prefix for the generated name | string |
"" |
no |
name_suffix | Optional suffix for the generated name | string |
"" |
no |
network_rules | Network Rules to apply to SignalR.name Name of the rulerule_type allowed values are allow or denyendpoint allowed values public-network or the name of the private linkservices allowed values ["ClientConnection", "ServerConnection", "RESTAPI"] |
list(object({ |
[] |
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 | Stack name | string |
n/a | yes |
use_caf_naming | Use the Azure CAF naming provider to generate default resource name. custom_name override this if set. Legacy default name is used if this is set to false . |
bool |
true |
no |
Name | Description |
---|---|
hostname | The FQDN of the SignalR service |
id | The ID of the SignalR service. |
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. |
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. |