Skip to content

Commit

Permalink
Add include_deprecated=true to source_ami_filter
Browse files Browse the repository at this point in the history
During an AMI build, Packer uses the name of the Amazon Linux source AMI defined in release-{ami-family}.auto.pkvars.hcl
It uses the most recent AMI that has the given name. In AL1 recipe, we added included_deprecated=true since the AL1 base AMIs are deprecated.

This commit adds the same flag to all other recipes, so that whenever the base AMI is deprecated, Packer is able to still use it.
  • Loading branch information
singholt committed May 30, 2024
1 parent 291de54 commit 0a6f3bb
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 24 deletions.
5 changes: 3 additions & 2 deletions al2.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ source "amazon-ebs" "al2" {
filters = {
name = "${var.source_ami_al2}"
}
owners = ["amazon"]
most_recent = true
owners = ["amazon"]
most_recent = true
include_deprecated = true
}
ssh_interface = "public_ip"
ssh_username = "ec2-user"
Expand Down
5 changes: 3 additions & 2 deletions al2023.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ source "amazon-ebs" "al2023" {
filters = {
name = "${var.source_ami_al2023}"
}
owners = ["amazon"]
most_recent = true
owners = ["amazon"]
most_recent = true
include_deprecated = true
}
ssh_interface = "public_ip"
ssh_username = "ec2-user"
Expand Down
5 changes: 3 additions & 2 deletions al2023arm.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ source "amazon-ebs" "al2023arm" {
filters = {
name = "${var.source_ami_al2023arm}"
}
owners = ["amazon"]
most_recent = true
owners = ["amazon"]
most_recent = true
include_deprecated = true
}
ssh_interface = "public_ip"
ssh_username = "ec2-user"
Expand Down
5 changes: 3 additions & 2 deletions al2023neu.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ source "amazon-ebs" "al2023neu" {
filters = {
name = "${var.source_ami_al2023}"
}
owners = ["amazon"]
most_recent = true
owners = ["amazon"]
most_recent = true
include_deprecated = true
}
ssh_interface = "public_ip"
ssh_username = "ec2-user"
Expand Down
5 changes: 3 additions & 2 deletions al2arm.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ source "amazon-ebs" "al2arm" {
filters = {
name = "${var.source_ami_al2arm}"
}
owners = ["amazon"]
most_recent = true
owners = ["amazon"]
most_recent = true
include_deprecated = true
}
ssh_interface = "public_ip"
ssh_username = "ec2-user"
Expand Down
5 changes: 3 additions & 2 deletions al2gpu.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ source "amazon-ebs" "al2gpu" {
filters = {
name = "${var.source_ami_al2}"
}
owners = ["amazon"]
most_recent = true
owners = ["amazon"]
most_recent = true
include_deprecated = true
}
ssh_interface = "public_ip"
ssh_username = "ec2-user"
Expand Down
5 changes: 3 additions & 2 deletions al2inf.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ source "amazon-ebs" "al2inf" {
filters = {
name = "${var.source_ami_al2}"
}
owners = ["amazon"]
most_recent = true
owners = ["amazon"]
most_recent = true
include_deprecated = true
}
ssh_interface = "public_ip"
ssh_username = "ec2-user"
Expand Down
5 changes: 3 additions & 2 deletions al2keplergpu.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ source "amazon-ebs" "al2keplergpu" {
filters = {
name = "${var.source_ami_al2}"
}
owners = ["amazon"]
most_recent = true
owners = ["amazon"]
most_recent = true
include_deprecated = true
}
ssh_interface = "public_ip"
ssh_username = "ec2-user"
Expand Down
5 changes: 3 additions & 2 deletions al2kernel5dot10.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ source "amazon-ebs" "al2kernel5dot10" {
filters = {
name = "${var.source_ami_al2kernel5dot10}"
}
owners = ["amazon"]
most_recent = true
owners = ["amazon"]
most_recent = true
include_deprecated = true
}
ssh_interface = "public_ip"
ssh_username = "ec2-user"
Expand Down
5 changes: 3 additions & 2 deletions al2kernel5dot10arm.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ source "amazon-ebs" "al2kernel5dot10arm" {
filters = {
name = "${var.source_ami_al2kernel5dot10arm}"
}
owners = ["amazon"]
most_recent = true
owners = ["amazon"]
most_recent = true
include_deprecated = true
}
ssh_interface = "public_ip"
ssh_username = "ec2-user"
Expand Down
5 changes: 3 additions & 2 deletions al2kernel5dot10gpu.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ source "amazon-ebs" "al2kernel5dot10gpu" {
filters = {
name = "${var.source_ami_al2kernel5dot10}"
}
owners = ["amazon"]
most_recent = true
owners = ["amazon"]
most_recent = true
include_deprecated = true
}
ssh_interface = "public_ip"
ssh_username = "ec2-user"
Expand Down
5 changes: 3 additions & 2 deletions al2kernel5dot10inf.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ source "amazon-ebs" "al2kernel5dot10inf" {
filters = {
name = "${var.source_ami_al2kernel5dot10}"
}
owners = ["amazon"]
most_recent = true
owners = ["amazon"]
most_recent = true
include_deprecated = true
}
ssh_interface = "public_ip"
ssh_username = "ec2-user"
Expand Down

0 comments on commit 0a6f3bb

Please sign in to comment.