Skip to content

Commit

Permalink
fix: Take ami id into account for random_pet keeper
Browse files Browse the repository at this point in the history
  • Loading branch information
js-timbirkett committed Mar 10, 2020
1 parent 1db1d2a commit bb9874b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/worker_groups/random.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resource "random_pet" "worker_groups" {
length = 2

keepers = {
ami_id = lookup(each.value, "ami_id", null)
ami_id = coalesce(each.value["ami_id"], each.value["platform"] == "windows" ? local.default_ami_id_windows : local.default_ami_id_linux)
root_volume_size = lookup(each.value, "root_volume_size", null)
instance_type = each.value["instance_type"]

Expand Down

0 comments on commit bb9874b

Please sign in to comment.