-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
128 lines (109 loc) · 3.25 KB
/
variables.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
variable "project" {
type = string
description = "Project name"
}
variable "env" {
type = string
description = "Environment name"
}
variable "location" {
type = string
description = "Azure location"
}
variable "resource_group" {
type = string
description = "The name of the resource group"
}
variable "suffix" {
type = string
description = "Optional suffix that would be added to the end of resources names. It is recommended to use dash at the beginning of variable (e.x., '-example')"
default = ""
}
variable "custom_virtual_machine_name" {
type = string
description = "Specifies the name of the virtual machine name resource"
default = ""
validation {
condition = (length(var.custom_virtual_machine_name) < 16)
error_message = "Name should be 15 characters or less"
}
}
variable "custom_network_interface_name" {
type = string
description = "Specifies the name of the virtual machine interface name resource"
default = null
}
variable "custom_public_ip_name" {
type = string
description = "Specifies the name of the public ip name name resource"
default = null
}
variable "tags" {
type = map(any)
description = "Resource tags"
default = {}
}
variable "subnet_id" {
type = string
description = "The ID of the Subnet where this Network Interface should be located in."
}
variable "public_ip_enabled" {
type = bool
description = "Boolean flag to enable Public Ip address creation and assignment to Virtual Machine"
default = false
}
variable "public_ip_allocation_method" {
type = string
description = "Defines the allocation method for this IP address. Possible values are Static or Dynamic"
default = "Static"
}
variable "network_interface_private_ip_address_allocation" {
type = string
description = "The allocation method used for the Private IP Address."
default = "Dynamic"
}
variable "vm_size" {
type = string
description = "The SKU which should be used for this Virtual Machine."
default = "Standard_D2s_v5"
}
variable "vm_admin_username" {
type = string
description = "The username of the local administrator used for the Virtual Machine."
default = "adminuser"
}
variable "vm_admin_password" {
type = string
description = "The password of the local administrator used for the Virtual Machine."
}
variable "os_disk" {
type = object({
caching = string
storage_account_type = string
})
description = "Objects to configure os disk reference for virtual machine"
default = {
caching = "ReadWrite"
storage_account_type = "Standard_LRS"
}
}
variable "source_image_reference" {
type = object({
publisher = string
offer = string
sku = string
version = string
})
description = "Objects to configure source image reference for virtual machine"
default = {
publisher = "MicrosoftWindowsServer"
offer = "WindowsServer"
sku = "2022-datacenter-azure-edition"
version = "latest"
}
}
variable "identity_enabled" {
type = bool
description = "Boolean flag than enables creation of System Assigned identity to VM"
default = false
}