@@ -13,12 +13,12 @@ variable "runner_version" {
13
13
}
14
14
15
15
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'"
17
17
type = string
18
- default = " x86_64 "
18
+ default = " x64 "
19
19
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 `."
22
22
}
23
23
}
24
24
@@ -49,7 +49,7 @@ variable "associate_public_ip_address" {
49
49
variable "instance_type" {
50
50
description = " The instance type Packer will use for the builder"
51
51
type = string
52
- default = " t4g.small "
52
+ default = null
53
53
}
54
54
55
55
variable "iam_instance_profile" {
@@ -109,12 +109,12 @@ data "http" github_runner_release_json {
109
109
110
110
locals {
111
111
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" )
113
113
}
114
114
115
115
source "amazon-ebs" "githubrunner" {
116
116
ami_name = " github-runner-al2023-${ var . architecture } -${ formatdate (" YYYYMMDDhhmm" , timestamp ())} "
117
- instance_type = var . instance_type
117
+ instance_type = local . instance_type
118
118
iam_instance_profile = var. iam_instance_profile
119
119
region = var. region
120
120
security_group_id = var. security_group_id
@@ -124,7 +124,7 @@ source "amazon-ebs" "githubrunner" {
124
124
125
125
source_ami_filter {
126
126
filters = {
127
- name = " al2023-ami-2023.*-kernel-6.*-${ var . architecture } "
127
+ name = " al2023-ami-2023.*-kernel-6.*-${ var . architecture == " x64 " ? " x86_64 " : var . architecture } "
128
128
root-device-type = " ebs"
129
129
virtualization-type = " hvm"
130
130
}
0 commit comments