templates/packer: append distro and arch to the ami name

Because the rhel-8 images share the same name, and `force_deregister` is
true, packer will always deregister one of them.
This commit is contained in:
Sanne Raymaekers 2022-09-15 18:05:08 +02:00
parent 561bbbbdf3
commit 183e10e466

View file

@ -38,7 +38,7 @@ build {
}
# Set a name for the resulting AMI.
ami_name = "${var.image_name}"
ami_name = "${var.image_name}-rhel-8-x86_64"
# Apply tags to the resulting AMI/EBS snapshot.
tags = {
@ -72,7 +72,7 @@ build {
}
# Set a name for the resulting AMI.
ami_name = "${var.image_name}"
ami_name = "${var.image_name}-rhel-8-aarch64"
# Apply tags to the resulting AMI/EBS snapshot.
tags = {