Hacker News new | ask | show | jobs
by vegardx 2589 days ago
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)}"
  
    ...
  }