Skip to content

Commit 6e595ef

Browse files
committed
Align defaults
1 parent dac5853 commit 6e595ef

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

images/linux-al2023/github_agent.linux.pkr.hcl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ variable "runner_version" {
1313
}
1414

1515
variable "architecture" {
16-
description = "The architecture of the runner. Supported values are 'x86-64' and 'arm64'"
16+
description = "The architecture of the runner. Supported values are 'x64' and 'arm64'"
1717
type = string
18-
default = "x86_64"
18+
default = "x64"
1919
validation {
20-
condition = contains(["arm64", "x86_64"], var.architecture)
21-
error_message = "`lambda_architecture` value is not valid, valid values are: `arm64` and `x86_64`."
20+
condition = contains(["arm64", "x64"], var.architecture)
21+
error_message = "`architecture` value is not valid, valid values are: `arm64` and `x64`."
2222
}
2323
}
2424

@@ -49,7 +49,7 @@ variable "associate_public_ip_address" {
4949
variable "instance_type" {
5050
description = "The instance type Packer will use for the builder"
5151
type = string
52-
default = "t4g.small"
52+
default = null
5353
}
5454

5555
variable "iam_instance_profile" {
@@ -109,12 +109,12 @@ data "http" github_runner_release_json {
109109

110110
locals {
111111
runner_version = coalesce(var.runner_version, trimprefix(jsondecode(data.http.github_runner_release_json.body).tag_name, "v"))
112-
instance_type = coalesce(var.instance_type, var.architecture == "arm64" ? "t4g.small" : "m3.medium")
112+
instance_type = coalesce(var.instance_type, var.architecture == "arm64" ? "t4g.medium" : "m3.medium")
113113
}
114114

115115
source "amazon-ebs" "githubrunner" {
116116
ami_name = "github-runner-al2023-${var.architecture}-${formatdate("YYYYMMDDhhmm", timestamp())}"
117-
instance_type = var.instance_type
117+
instance_type = local.instance_type
118118
iam_instance_profile = var.iam_instance_profile
119119
region = var.region
120120
security_group_id = var.security_group_id
@@ -124,7 +124,7 @@ source "amazon-ebs" "githubrunner" {
124124

125125
source_ami_filter {
126126
filters = {
127-
name = "al2023-ami-2023.*-kernel-6.*-${var.architecture}"
127+
name = "al2023-ami-2023.*-kernel-6.*-${var.architecture == "x64" ? "x86_64" : var.architecture}"
128128
root-device-type = "ebs"
129129
virtualization-type = "hvm"
130130
}

0 commit comments

Comments
 (0)