mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
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:
parent
2f289a2887
commit
19b956f31c
2 changed files with 16 additions and 15 deletions
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue