Skip to content

Commit f09fc1c

Browse files
HashiCorp Terraform Setup
1 parent c2626a7 commit f09fc1c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

terraform/main.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
resource "aws_key_pair" "sshkey" {
2+
key_name = "${var.stack}-key"
3+
public_key = "${file("${var.ssh_key}")}"
4+
}
5+
6+
resource "aws_instance" "ec2" {
7+
ami = "ami-063246c1e8988282c"
8+
instance_type = "${var.vm_size}"
9+
subnet_id = "${aws_subnet.subnet[0].id}"
10+
associate_public_ip_address = true
11+
vpc_security_group_ids = ["${aws_security_group.sg.id}"]
12+
key_name = "${aws_key_pair.sshkey.key_name}"
13+
tags = {
14+
Name = "${var.stack}-growlerfriday"
15+
}
16+
}

0 commit comments

Comments
 (0)