diff --git a/.github/workflows/ostests-matrix.yaml b/.github/workflows/ostests-matrix.yaml index fea0c99dc055..af7b751a3153 100644 --- a/.github/workflows/ostests-matrix.yaml +++ b/.github/workflows/ostests-matrix.yaml @@ -22,6 +22,7 @@ on: required: true default: >- [ + "al2023", "alpine_3_17", "centos_7", "centos_8", "centos_9", "debian_10", "debian_11", "debian_12", diff --git a/hack/ostests/README.md b/hack/ostests/README.md index 442526eecd75..e1987806004b 100644 --- a/hack/ostests/README.md +++ b/hack/ostests/README.md @@ -67,6 +67,7 @@ terraform apply ### `os`: Operating system stack +* `al2023`: Amazon Linux 2023 * `alpine_3_17`: Alpine Linux 3.17 * `centos_7`: CentOS Linux 7 (Core) * `centos_8`: CentOS Stream 8 diff --git a/hack/ostests/modules/os/main.tf b/hack/ostests/modules/os/main.tf index b7a7c87aee46..cfeea26468b3 100644 --- a/hack/ostests/modules/os/main.tf +++ b/hack/ostests/modules/os/main.tf @@ -2,6 +2,7 @@ locals { # Boilerplate to make terraform a little bit dynamic os = { + al2023 = local.os_al2023 alpine_3_17 = local.os_alpine_3_17 centos_7 = local.os_centos_7 centos_8 = local.os_centos_8 diff --git a/hack/ostests/modules/os/os_al2023.tf b/hack/ostests/modules/os/os_al2023.tf new file mode 100644 index 000000000000..4afc6db032f6 --- /dev/null +++ b/hack/ostests/modules/os/os_al2023.tf @@ -0,0 +1,44 @@ +# https://docs.aws.amazon.com/linux/al2023/ug/naming-and-versioning.html + +data "aws_ami" "al2023" { + count = var.os == "al2023" ? 1 : 0 + + owners = ["137112412989"] + name_regex = "^al2023-ami-2023.\\d+.\\d+.\\d+-.*-x86_64" + most_recent = true + + filter { + name = "name" + values = ["al2023-ami-2023.*-x86_64"] + } + + filter { + name = "architecture" + values = ["x86_64"] + } + + filter { + name = "root-device-type" + values = ["ebs"] + } + + filter { + name = "virtualization-type" + values = ["hvm"] + } +} + +locals { + os_al2023 = var.os != "al2023" ? {} : { + node_configs = { + default = { + ami_id = one(data.aws_ami.al2023.*.id) + + connection = { + type = "ssh" + username = "ec2-user" + } + } + } + } +}