Clean up files

Standardize on the use of main.tf for the "main" Terraform configuration as it seems to be a best practice within the Terraform community

Signed-off-by: Scott Lowe <scott.lowe@scottlowe.org>
This commit is contained in:
Scott Lowe 2017-10-17 14:00:36 -06:00
parent 2f289a2887
commit 19b956f31c
No known key found for this signature in database
GPG key ID: 949F43F6E6C11780
2 changed files with 16 additions and 15 deletions

View file

@ -1,15 +0,0 @@
# Launch instances across subnets/AZs
resource "aws_instance" "node" {
count = "${var.num_nodes}"
ami = "${data.aws_ami.node_ami.id}"
instance_type = "${var.node_type}"
key_name = "${var.key_pair}"
vpc_security_group_ids = ["${aws_vpc.demo_vpc.default_security_group_id}"]
subnet_id = "${element(aws_subnet.demo_subnet.*.id, count.index)}"
tags {
Name = "node-${count.index}"
tool = "terraform"
demo = "terraform"
area = "compute"
}
}

View file

@ -53,3 +53,19 @@ resource "aws_subnet" "demo_subnet" {
area = "networking"
}
}
# Launch instances across subnets/AZs
resource "aws_instance" "node" {
count = "${var.num_nodes}"
ami = "${data.aws_ami.node_ami.id}"
instance_type = "${var.node_type}"
key_name = "${var.key_pair}"
vpc_security_group_ids = ["${aws_vpc.demo_vpc.default_security_group_id}"]
subnet_id = "${element(aws_subnet.demo_subnet.*.id, count.index)}"
tags {
Name = "node-${count.index}"
tool = "terraform"
demo = "terraform"
area = "compute"
}
}