-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
170 lines (161 loc) · 4.81 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# General
variable "resource_group_name" {
type = "string"
description = "Name of the resource group to create"
}
variable "location" {
type = "string"
description = "Azure region all the resources will be deployed to"
}
variable "tags" {
type = "map"
description = <<-HEREDOC
Everything should be tagged, for guidance see:-
https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-subscription-governance#resource-tags
HEREDOC
}
# Networking
variable "vnet_name" {
type = "string"
description = "Name of the VNet to create"
}
variable "vnet_address_space" {
type = "list"
description = "VNet IP reange"
}
variable "subnet_name" {
type = "string"
description = "Name of the subnet to create"
}
variable "subnet_address_prefix" {
type = "string"
description = "subnet IP range"
}
variable "public_ip_name" {
type = "string"
description = "Name of the public IP to create"
}
variable "public_ip_address_allocation" {
type = "string"
description = "Static or Dynamic"
}
variable "load_balancer_name" {
type = "string"
description = "Name of the load balancer to create"
}
# VM Scale Set
variable "vm_scale_set_name" {
type = "string"
description = "Name of the VM scale set to create"
}
variable "vm_scale_set_upgrade" {
type = "string"
description = "Manual or Automatic"
}
variable "vm_scale_set_capacity" {
type = "string"
description = "Specify "
}
variable "vm_scale_set_tier" {
type = "string"
description = "Standard, Silver or Gold"
}
# VMs
variable "vm_size" {
type = "string"
description = <<-HEREDOC
Select the size of the VMs to create:-
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes
HEREDOC
}
# TODO: try out a map?
variable "vm_image_publisher" {
type = "string"
description = <<-HEREDOC
Specify the image publisher to use, see:-
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage
or PowerShell:-
$loc = [your-azure-region-here]
$pub = 'MicrosoftWindowsServer'
$off = 'WindowsServer'
Get-AzureRMVMImageSku -Location $loc -Publisher $pub -Offer $off
HEREDOC
}
variable "vm_image_offer" {
type = "string"
description = <<-HEREDOC
Specify the image offer to use, see:-
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage
or PowerShell:-
$loc = [your-azure-region-here]
$pub = 'MicrosoftWindowsServer'
$off = 'WindowsServer'
Get-AzureRMVMImageSku -Location $loc -Publisher $pub -Offer $off
HEREDOC
}
variable "vm_image_sku" {
type = "string"
description = <<-HEREDOC
Specify the image SKU to use, see:-
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage
or PowerShell:-
$loc = [your-azure-region-here]
$pub = 'MicrosoftWindowsServer'
$off = 'WindowsServer'
Get-AzureRMVMImageSku -Location $loc -Publisher $pub -Offer $off
HEREDOC
}
variable "vm_image_version" {
type = "string"
description = <<-HEREDOC
Specify the image version to use, see:-
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage
or PowerShell:-
$loc = [your-azure-region-here]
$pub = 'MicrosoftWindowsServer'
$off = 'WindowsServer'
Get-AzureRMVMImageSku -Location $loc -Publisher $pub -Offer $off
HEREDOC
}
# TODO: alternativily try Packer images?
# could be good if map works...
# variable "vm_image" {
# type = "string"
# description = "name of the custom VM image to use"
# }
# variable "vm_images_resource_group_name" {
# type = "string"
# description = "name of the reosurce group where custom VM images are stored"
# }
variable "vm_name_prefix" {
type = "string"
description = "Prefix to the name of the VMs to create in the scale set"
}
variable "vm_admin_username" {
type = "string"
description = "Username for the local administrator account"
}
variable "vm_admin_password" {
type = "string"
description = "Password for the local administrator account"
}
variable "vm_os_disk_type" {
type = "string"
description = "Premium_LRS is recommended"
}
variable "vm_data_disk_size" {
type = "string"
description = "Size of the data disk in GB"
}
variable "vm_data_disk_type" {
type = "string"
description = "Premium_LRS or Standard_LRS"
}
variable "vm_network_profile_name" {
type = "string"
description = "Name of the VM network profile to create"
}
variable "vm_network_profile_ip_name" {
type = "string"
description = "Name of the VM network profile IP configuration to create"
}