-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzodiac.tf
54 lines (44 loc) · 1.37 KB
/
zodiac.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
resource "aws_instance" "zodiac-grid-linux" {
count = 5
subnet_id = "${aws_subnet.subnet.id}"
ami = "ami-afe438b9"
instance_type = "t2.micro"
key_name = "test-validation"
associate_public_ip_address = true
tags {
"Name" = "zodiac-grid-linux"
}
connection {
user = "ec2-user"
private_key = "${file("~/workshop/ec2/test-validation.pem")}"
}
provisioner "remote-exec" {
inline = [
"curl -sSL https://get.docker.com/ | sh",
"sudo systemctl enable docker.service",
"sudo systemctl start docker.service",
"sudo usermod -aG docker ec2-user"
]
}
}
# TODO Swarm not yet (1.13) supported on Windows
# resource "aws_instance" "selenium-grid-windows" {
# subnet_id = "${aws_subnet.subnet.id}"
#
# ami = "ami-e7b755f1"
# instance_type = "t2.micro"
# associate_public_ip_address = true
# tags {
# "Name" = "selenium-grid-windows"
# }
# user_data = <<EOF
# <script>
# winrm quickconfig -q & winrm set winrm/config/winrs @{MaxMemoryPerShellMB="300"} & winrm set winrm/config @{MaxTimeoutms="1800000"} & winrm set winrm/config/service @{AllowUnencrypted="true"} & winrm set winrm/config/service/auth @{Basic="true"}
# </script>
# <powershell>
# netsh advfirewall set allprofiles state off
# $admin = [adsi]("WinNT://./administrator, user")
# $admin.psbase.invoke("SetPassword", "Foo*Bar")
# </powershell>
# EOF
# }