github.com/hugorut/terraform@v1.1.3/src/terraform/testdata/plan-destroy-interpolated-count/main.tf (about)

     1  variable "list" {
     2    default = ["1", "2"]
     3  }
     4  
     5  resource "aws_instance" "a" {
     6    count = length(var.list)
     7  }
     8  
     9  locals {
    10    ids = aws_instance.a[*].id
    11  }
    12  
    13  module "empty" {
    14    source = "./mod"
    15    input = zipmap(var.list, local.ids)
    16  }
    17  
    18  output "out" {
    19    value = aws_instance.a[*].id
    20  }