Skip to content

Commit

Permalink
Make it possible to scale EC2 instances without recreating resources.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsecher committed Mar 19, 2018
1 parent 2a964b4 commit 6656ad0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ resource "aws_instance" "cluster-node" {
resource "aws_volume_attachment" "cluster-storage-attachement" {
count = "${var.cluster_size}"
device_name = "/dev/xvdb"
volume_id = "${element(aws_ebs_volume.cluster-storage.*.id,count.index)}"
instance_id = "${element(aws_instance.cluster-node.*.id,count.index)}"
volume_id = "${aws_ebs_volume.cluster-storage.*.id[count.index]}"
instance_id = "${aws_instance.cluster-node.*.id[count.index]}"
}

0 comments on commit 6656ad0

Please sign in to comment.