From e2a89d9e52cc9cb6c45e228b6ec81f86fa04e6e9 Mon Sep 17 00:00:00 2001 From: Adam Connelly Date: Mon, 24 Jun 2024 11:58:11 +0100 Subject: [PATCH] fix: amazon-ami-management plugin Recent versions of Packer have validation to ensure that the version of the plugin reported via the `describe` command match the version in the filename. Our fork of the `amazon-ami-management` plugin had its version set to `2.0.0-dev`, but the filename just had `2.0.0`. The reason we had forked was to add the ability to filter by tags. This functionality is available in the upstream, which also has the fix for the version number, so we can switch back. --- aws.pkr.hcl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/aws.pkr.hcl b/aws.pkr.hcl index 58722b6..614e010 100644 --- a/aws.pkr.hcl +++ b/aws.pkr.hcl @@ -6,8 +6,8 @@ packer { } amazon-ami-management = { - version = "2.0.0" - source = "github.com/spacelift-io/amazon-ami-management" + version = "= 1.5.0" + source = "github.com/wata727/amazon-ami-management" } } } @@ -161,8 +161,9 @@ build { post-processor "amazon-ami-management" { # Deregister old AMIs, keep only the latest 180. regions = var.ami_regions - tag_key = "Name" - tag_value = "Spacelift AMI" + tags = { + Name = "Spacelift AMI" + } keep_releases = 180 }