diff --git a/images/linux-amzn2/github_agent.linux.pkr.hcl b/images/linux-amzn2/github_agent.linux.pkr.hcl index b7eb59772f..f23f3e82c5 100644 --- a/images/linux-amzn2/github_agent.linux.pkr.hcl +++ b/images/linux-amzn2/github_agent.linux.pkr.hcl @@ -81,7 +81,7 @@ source "amazon-ebs" "githubrunner" { associate_public_ip_address = var.associate_public_ip_address source_ami_filter { filters = { - name = "amzn2-ami-hvm-2.*-x86_64-ebs" + name = "amzn2-ami-kernel-5.*-hvm-*-x86_64-gp2" root-device-type = "ebs" virtualization-type = "hvm" } diff --git a/modules/runners/main.tf b/modules/runners/main.tf index 60826522b6..d693573c7f 100644 --- a/modules/runners/main.tf +++ b/modules/runners/main.tf @@ -16,7 +16,7 @@ locals { default_ami = { "windows" = { name = ["Windows_Server-20H2-English-Core-ContainersLatest-*"] } - "linux" = var.runner_architecture == "arm64" ? { name = ["amzn2-ami-hvm-2*-arm64-gp2"] } : { name = ["amzn2-ami-hvm-2.*-x86_64-ebs"] } + "linux" = var.runner_architecture == "arm64" ? { name = ["amzn2-ami-kernel-5.*-hvm-*-arm64-gp2"] } : { name = ["amzn2-ami-kernel-5.*-hvm-*-x86_64-gp2"] } } default_userdata_template = {