github.com/hashicorp/terraform-plugin-sdk@v1.17.2/terraform/testdata/apply-resource-scale-in/main.tf (about) 1 variable "instance_count" {} 2 3 resource "aws_instance" "one" { 4 count = var.instance_count 5 } 6 7 locals { 8 one_id = element(concat(aws_instance.one.*.id, list("")), 0) 9 } 10 11 resource "aws_instance" "two" { 12 value = local.one_id 13 }