-
Notifications
You must be signed in to change notification settings - Fork 5
/
r-naming.tf
39 lines (36 loc) · 1.27 KB
/
r-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
data "azurecaf_name" "aks" {
name = var.stack
resource_type = "azurerm_kubernetes_cluster"
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" "aks_identity" {
name = var.stack
resource_type = "azurerm_user_assigned_identity"
prefixes = compact(["aks", 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" "aks_nodes_rg" {
name = local.aks_name
resource_type = "azurerm_resource_group"
prefixes = var.name_prefix == "" ? null : [local.name_prefix]
suffixes = ["nodes"]
use_slug = true
clean_input = true
separator = "-"
}
data "azurecaf_name" "dcr" {
name = var.stack
resource_type = "azurerm_resource_group"
prefixes = compact([local.name_prefix, "dcr"])
suffixes = compact([var.client_name, var.location_short, var.environment, local.name_suffix])
use_slug = false
clean_input = true
separator = "-"
}