scottslowe-learning-tools/terraform-aws/simple-ec2/main.tf
Scott S. Lowe 3279b2e390 Add Terraform configuration for simple EC2 instance
Add a simple Terraform configuration to spin up an Ubuntu 14.04 EC2 instance in the default VPC using the default security group.

Signed-off-by: Scott S. Lowe <scott.lowe@scottlowe.org>
2016-10-21 15:29:32 -06:00

11 lines
452 B
HCL

# Create a new Ubuntu 14.04 instance using values from vars.tf and data.tf
resource "aws_instance" "test-01" {
ami = "${data.aws_ami.ubuntu-1404-ami.id}"
instance_type = "${var.flavor}"
key_name = "${var.keypair}"
vpc_security_group_ids = ["${var.sec-group}"]
subnet_id = "${data.aws_subnet.default-subnet.id}"
tags {
Name = "terraform"
}
}