-
Notifications
You must be signed in to change notification settings - Fork 22
/
variables-naming.tf
66 lines (56 loc) · 1.95 KB
/
variables-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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Generic naming variables
variable "name_prefix" {
description = "Optional prefix for the generated name."
type = string
default = ""
}
variable "name_suffix" {
description = "Optional suffix for the generated name."
type = string
default = ""
}
variable "use_caf_naming" {
description = "Use the Azure CAF naming provider to generate default resource name. `custom_name` override this if set. Legacy default name is used if this is set to `false`."
type = bool
default = true
}
# Custom naming override
variable "custom_name" {
description = "Custom name for the Virtual Machine. Generated if not set."
type = string
default = ""
}
variable "custom_computer_name" {
description = "Custom name for the Virtual Machine Hostname. Based on `custom_name` if not set."
type = string
default = ""
validation {
condition = var.custom_computer_name == "" || (can(regex("^[a-zA-Z0-9-]{1,15}$", var.custom_computer_name)) && !can(regex("^[0-9-]", var.custom_computer_name)))
error_message = "The `custom_computer_name` value must be 15 characters long at most and can contain only allowed characters (Windows constraint) `[a-zA-Z0-9-]{1,15}`."
}
}
variable "custom_public_ip_name" {
description = "Custom name for public IP. Generated if not set."
type = string
default = null
}
variable "custom_nic_name" {
description = "Custom name for the NIC interface. Generated if not set."
type = string
default = null
}
variable "custom_ipconfig_name" {
description = "Custom name for the IP config of the NIC. Generated if not set."
type = string
default = null
}
variable "os_disk_custom_name" {
description = "Custom name for OS disk. Generated if not set."
type = string
default = null
}
variable "custom_dcr_name" {
description = "Custom name for Data collection rule association"
type = string
default = null
}