forked from hicsh/terraform-azure-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
110 lines (85 loc) · 1.62 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
variable "vm_count" {
type = "string"
default = 1
}
variable "vm_name" {
type = "string"
}
variable "vm_location" {
type = "string"
}
variable "vm_resource_group" {
type = "string"
}
variable "vm_subnet_id" {
type = "string"
}
variable "vm_size" {
type = "string"
default = "Standard_F1"
}
variable "storage_tier" {
type = "string"
default = "Standard_LRS"
}
variable "vm_admin_name" {
type = "string"
default = "VMAdmin"
}
variable "vm_admin_passwd" {
type = "string"
}
variable "vm_data_disk_name" {
type = "list"
}
variable "vm_data_disk_size" {
type = "list"
}
variable "vm_publisher_name" {
type = "string"
default = "Canonical"
}
variable "vm_offer" {
type = "string"
default = "UbuntuServer"
}
variable "vm_sku" {
type = "string"
default = "18.04-LTS"
}
variable "vm_diagnostic_disk_uri" {
type = "string"
}
variable "vm_ssh_pubkey" {
type = "string"
}
variable "vm_environment_tag" {
type = "string"
default = "Poc"
}
# DNS
variable "vm_domain_name_label" {
type = "string"
}
# PROVISIONING
variable "vm_provisioning_plan" {
type = "string"
}
variable "vm_cloud_init_script_path" {
type = "string"
default = "provision/bootstrap.sh.tpl"
}
data "template_file" "cloudconfig" {
template = "${file("${var.vm_cloud_init_script_path}")}"
vars = {
provisioning_plan = "${var.vm_provisioning_plan}"
}
}
#https://www.terraform.io/docs/providers/template/d/cloudinit_config.html
data "template_cloudinit_config" "config" {
gzip = true
base64_encode = true
part {
content = "${data.template_file.cloudconfig.rendered}"
}
}