News for hackers. Stuff that matters.
Re:Terraform 0.12 by vegardx on Thursday May 23, 2019 @03:19AM (#19989328)
Alternatively you could put the AMIs in an array, and just iterate over that array.

  locals {
    nomad_ami = [
      "${data.aws_ami.nomadclient_tick.image_id}",
      "${data.aws_ami.nomadclient_tock.image_id}",
    ]
  }

  resource "aws_instance" "nomadclients" {
    count = 6
    ami   = "${element(local.nomad_ami, count.index)}"
  
    ...
  }

There are no comments on this comment yet.