From 2d2947574247bb63027ea816fcd0e4988bfe1b4c Mon Sep 17 00:00:00 2001 From: "derek.howard" Date: Wed, 28 Aug 2024 12:07:34 -0400 Subject: [PATCH] fix aws ami logic --- settings.tf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/settings.tf b/settings.tf index 0ea8820..1dccbe2 100644 --- a/settings.tf +++ b/settings.tf @@ -114,9 +114,14 @@ data "aws_route53_zone" "main" { data "aws_ami" "gold_image" { count = var.gold_image_date != "" ? 1 : 0 - most_recent = false + most_recent = true name_regex = "^amzn2-eks-${module.eks.cluster_version}-gi-${var.gold_image_date}*" owners = ["743302140042"] + + filter { + name = "name" + values = ["amzn2-eks-${module.eks.cluster_version}-gi-${var.gold_image_date}*"] + } } data "aws_s3_bucket" "logs" {