From b7e81e009c1e58635b81c9f068f5c3e306e9401c Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Tue, 7 May 2024 20:04:04 -0400 Subject: [PATCH] make sure to replace ami if s3 object changes --- hosts/arrow/aws/image.tf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/arrow/aws/image.tf b/hosts/arrow/aws/image.tf index 53cc979..7317880 100644 --- a/hosts/arrow/aws/image.tf +++ b/hosts/arrow/aws/image.tf @@ -70,6 +70,9 @@ resource "aws_ebs_snapshot_import" "image" { } role_name = aws_iam_role.vmimport.name + lifecycle { + replace_triggered_by = [data.aws_s3_object.image.checksum_sha256] + } } # Convert to AMI