-
Notifications
You must be signed in to change notification settings - Fork 0
/
pacman-b.tf
42 lines (33 loc) · 863 Bytes
/
pacman-b.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
#data "template_file" "pacman-b-init" {
# template = file("pacman-b.sh.tpl")
#}
resource "aws_instance" "pacman-b" {
ami = var.ami_pacman
instance_type = var.instance_type_linux_server
subnet_id = var.subnet_id
key_name = var.key_name
# user_data = data.template_file.pacman-b-init.rendered
user_data = templatefile("pacman-b.sh.tpl", {
device_id_script_tag = var.device_id_script_tag
})
tags = {
for k, v in merge({
app_type = "pacman-b"
Name = "svk-pacman-b"
},
var.default_ec2_tags): k => v
}
provisioner "file" {
source = "files/"
destination = "/tmp"
connection {
type = "ssh"
user = var.ssh_user
private_key = file("~/aws-keyfile.pem")
host = self.public_ip
}
}
}
output "pacman-b_ip" {
value = aws_instance.pacman-b.public_ip
}