From 9aa5532e6e9d7fab7ea2f1e9995e608cf063ca5e Mon Sep 17 00:00:00 2001 From: Niek Palm Date: Wed, 9 Mar 2022 13:01:13 +0100 Subject: [PATCH] fix: Upgrade Amazon base AMI to Amazon Linux 2 kernel 5x (#1812) --- images/linux-amzn2/github_agent.linux.pkr.hcl | 2 +- modules/runners/main.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 = {