-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrelay.tf
More file actions
32 lines (28 loc) · 1.24 KB
/
relay.tf
File metadata and controls
32 lines (28 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module "relay_hybrid_connection" {
count = var.relay_namespace_name != null ? 1 : 0
source = "../dtos-devops-templates/infrastructure/modules/relay-hybrid-connection"
name = "hc-${var.app_short_name}-${var.environment}"
relay_namespace_name = var.relay_namespace_name
resource_group_name = var.resource_group_name_infra
authorization_rules = {
"${var.app_short_name}-${var.environment}-listen-send" = {
listen = true
send = true
}
}
}
module "relay_send_identity" {
count = var.relay_namespace_name != null ? 1 : 0
source = "../dtos-devops-templates/infrastructure/modules/managed-identity"
resource_group_name = azurerm_resource_group.main.name
location = var.region
uai_name = "mi-${var.app_short_name}-${var.environment}-relay-send"
}
module "relay_send_role_assignment" {
count = var.relay_namespace_name != null ? 1 : 0
source = "../dtos-devops-templates/infrastructure/modules/rbac-assignment"
principal_id = module.relay_send_identity[0].principal_id
role_definition_name = "Azure Relay Sender"
scope = var.relay_namespace_id
depends_on = [module.relay_send_identity]
}