-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathd-naming.tf
43 lines (38 loc) · 1.59 KB
/
d-naming.tf
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
33
34
35
36
37
38
39
40
41
42
43
data "azurecaf_name" "vnet_gw" {
name = var.stack
resource_type = "azurerm_virtual_network_gateway"
prefixes = var.name_prefix == "" ? null : [local.name_prefix]
suffixes = compact([var.client_name, var.location_short, var.environment, local.name_suffix])
use_slug = true
clean_input = true
separator = "-"
}
data "azurecaf_name" "local_network_gateway" {
for_each = { for c in var.vpn_connections : c.name => c }
name = var.stack
resource_type = "azurerm_local_network_gateway"
prefixes = var.name_prefix == "" ? null : [local.name_prefix]
suffixes = compact([var.client_name, var.location_short, var.environment, local.name_suffix, lookup(each.value, "name_suffix", "")])
use_slug = true
clean_input = true
separator = "-"
}
data "azurecaf_name" "vpn_gw_connection" {
for_each = { for c in var.vpn_connections : c.name => c }
name = var.stack
resource_type = "azurerm_vpn_gateway_connection"
prefixes = var.name_prefix == "" ? null : [local.name_prefix]
suffixes = compact([var.client_name, var.location_short, var.environment, local.name_suffix, lookup(each.value, "name_suffix", "")])
use_slug = true
clean_input = true
separator = "-"
}
data "azurecaf_name" "gw_pub_ip" {
name = var.stack
resource_type = "azurerm_public_ip"
prefixes = var.name_prefix == "" ? null : [local.name_prefix]
suffixes = compact([var.client_name, var.location_short, var.environment, local.name_suffix])
use_slug = true
clean_input = true
separator = "-"
}