github.com/LorbusChris/terraform@v0.11.12-beta1/terraform/test-fixtures/apply-resource-scale-in/main.tf (about) 1 variable "count" {} 2 3 resource "aws_instance" "one" { 4 count = "${var.count}" 5 } 6 7 locals { 8 "one_id" = "${element(concat(aws_instance.one.*.id, list("")), 0)}" 9 } 10 11 resource "aws_instance" "two" { 12 val = "${local.one_id}" 13 }