-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvSphereDC.tf
81 lines (69 loc) · 1.9 KB
/
vSphereDC.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
#############################################
# Created by Jonny Ford, 9th March 2017 #
# Edit the following areas: #
# name #
# gateway #
# ipv4_address #
# datastore #
# dns_server #
#############################################
# Configure the VMware vSphere Provider
provider "vsphere" {
user = "${var.vsphere_user}"
password = "${var.vsphere_password}"
vsphere_server = "${var.vsphere_server}"
# if you have a self-signed cert
allow_unverified_ssl = true
}
resource "vsphere_virtual_machine" "WindowsDC1" {
name = "xxxwvinfr01"
folder = "Infrastructure"
vcpu = 2
memory = 4096
domain = "emea.akqa.local"
dns_suffix = "emea.akqa.local"
dns_server = "10.xxx.20.93", "10.xxx.20.94"
resource_pool = "Infrastructure Critical"
gateway = "10.xxx.20.1"
network_interface {
label = "Internal Servers VLAN20"
ipv4_address = "10.xxx.20.93"
ipv4_prefix_length = "24"
}
disk {
datastore = "xxxVOL01"
template = "templates/WindowsServer2012R2"
}
windows_opt_config {
product_key = "xxx.xxxx"
domain = "emea.akqa.local"
domain_user = "emea\user.name-admin"
domain_password = "yourPasswordHere"
}
}
resource "vsphere_virtual_machine" "WindowsDC2" {
name = "xxxwvinfr02"
folder = "Infrastructure"
vcpu = 2
memory = 4096
domain = "emea.akqa.local"
dns_suffix = "emea.akqa.local"
dns_server = "10.xxx.20.93", "10.xxx.20.94"
resource_pool = "Infrastructure Critical"
gateway = "10.xxx.20.1"
network_interface {
label = "Internal Servers VLAN20"
ipv4_address = "10.xxx.20.94"
ipv4_prefix_length = "24"
}
disk {
datastore = "xxxVOL01"
template = "templates/WindowsServer2012R2"
}
windows_opt_config {
product_key = "xxx.xxxx"
domain = "emea.akqa.local"
domain_user = "emea\user.name-admin"
domain_password = "yourPasswordHere"
}
}