-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathd-naming.tf
41 lines (37 loc) · 1.39 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
data "azurecaf_name" "vm" {
name = var.stack
resource_type = "azurerm_linux_virtual_machine"
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" "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 = "-"
}
data "azurecaf_name" "nic" {
name = var.stack
resource_type = "azurerm_network_interface"
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" "disk" {
for_each = var.storage_data_disk_config
name = var.stack
resource_type = "azurerm_managed_disk"
prefixes = var.name_prefix == "" ? null : [local.name_prefix]
suffixes = compact([var.client_name, var.location_short, var.environment, local.name_suffix, each.key])
use_slug = true
clean_input = true
separator = "-"
}