generated from Azure/terraform-verified-module
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnaming.tf
45 lines (41 loc) · 2.21 KB
/
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
44
45
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#------------------------------------------------------------
# Azure NoOps Naming - This should be used on all resource naming
#------------------------------------------------------------
data "azurenoopsutils_resource_name" "app_service_web" {
name = var.workload_name
resource_type = "azurerm_app_service"
prefixes = [var.org_name, var.use_location_short_name ? module.mod_azure_region_lookup.location_short : var.location]
suffixes = compact([var.name_prefix == "" ? null : local.name_prefix, var.deploy_environment, local.name_suffix, var.use_naming ? "" : "web"])
use_slug = var.use_naming
clean_input = true
separator = "-"
}
data "azurenoopsutils_resource_name" "app_service_plan" {
name = var.workload_name
resource_type = "azurerm_app_service_plan"
prefixes = [var.org_name, var.use_location_short_name ? module.mod_azure_region_lookup.location_short : var.location]
suffixes = compact([var.name_prefix == "" ? null : local.name_prefix, var.deploy_environment, local.name_suffix, var.use_naming ? "" : "asp"])
use_slug = var.use_naming
clean_input = true
separator = "-"
}
data "azurenoopsutils_resource_name" "application_insights" {
name = var.workload_name
resource_type = "azurerm_application_insights"
prefixes = [var.org_name, var.use_location_short_name ? module.mod_azure_region_lookup.location_short : var.location]
suffixes = compact([var.name_prefix == "" ? null : local.name_prefix, var.deploy_environment, local.name_suffix, var.use_naming ? "" : "ai"])
use_slug = var.use_naming
clean_input = true
separator = "-"
}
data "azurenoopsutils_resource_name" "app_user_assigned_identity" {
name = var.workload_name
resource_type = "azurerm_user_assigned_identity"
prefixes = [var.org_name, var.use_location_short_name ? module.mod_azure_region_lookup.location_short : var.location]
suffixes = compact([var.name_prefix == "" ? null : local.name_prefix, var.deploy_environment, local.name_suffix, var.use_naming ? "" : "uid"])
use_slug = var.use_naming
clean_input = true
separator = "-"
}