Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Amazon Linux 2023 to OS testing matrix #3615

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ostests-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
required: true
default: >-
[
"al2023",
"alpine_3_17",
"centos_7", "centos_8", "centos_9",
"debian_10", "debian_11", "debian_12",
Expand Down
1 change: 1 addition & 0 deletions hack/ostests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions hack/ostests/modules/os/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
44 changes: 44 additions & 0 deletions hack/ostests/modules/os/os_al2023.tf
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
Loading