-
Notifications
You must be signed in to change notification settings - Fork 2
/
instances.tf
33 lines (29 loc) · 842 Bytes
/
instances.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
resource "aws_instance" "webapp" {
count = 1
ami = "${var.ami}"
instance_type = "${var.aws_instance_type}"
key_name = "${aws_key_pair.admin_key.key_name}"
security_groups = ["${aws_security_group.base_security_group.name}"]
associate_public_ip_address = true
user_data = "${file("installpkgs.sh")}"
connection {
user = "root",
private_key = "${file("keys/aws_terraform")}",
agent = false
}
provisioner "file" {
source = "ssl"
destination = "/tmp"
}
provisioner "file" {
source = "drupal7"
destination = "/tmp/drupal7"
}
provisioner "file" {
source = "nginx.conf"
destination = "/tmp/nginx.conf"
}
tags {
Name = "Ubuntu launched by Terraform"
}
}