Skip to content

Commit 480bc64

Browse files
committed
Adjust for ARM
1 parent 37854c4 commit 480bc64

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -326,15 +326,7 @@ The following sub modules are optional and are provided as example or utility:
326326

327327
### ARM64 configuration for submodules
328328

329-
When not using the top-level module and specifying an `a1`, `t4g` or `*6g*` (6th-gen Graviton2) `instance_type`, the `runner-binaries-syncer` and `runners` submodules need to be configured appropriately for pulling the ARM64 GitHub action runner binary and leveraging the arm64 AMI for the runners.
330-
331-
When configuring `runner-binaries-syncer`
332-
333-
- _runner_architecture_ - set to `arm64`, defaults to `x64`
334-
335-
When configuring `runners`
336-
337-
- _ami_filter_ - set to `["amzn2-ami-hvm-2*-arm64-gp2"]`, defaults to `["amzn2-ami-hvm-2.*-x86_64-ebs"]`
329+
When using the top level module configure `runner_architecture = arm64` and insure the list of `instance_types` matches. When not using the top-level ensure the bot properties are set on the submodules.
338330

339331
## Debugging
340332

modules/runner-binaries-syncer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ No modules.
9191
| <a name="input_role_path"></a> [role\_path](#input\_role\_path) | The path that will be added to the role, if not set the environment name will be used. | `string` | `null` | no |
9292
| <a name="input_role_permissions_boundary"></a> [role\_permissions\_boundary](#input\_role\_permissions\_boundary) | Permissions boundary that will be added to the created role for the lambda. | `string` | `null` | no |
9393
| <a name="input_runner_allow_prerelease_binaries"></a> [runner\_allow\_prerelease\_binaries](#input\_runner\_allow\_prerelease\_binaries) | Allow the runners to update to prerelease binaries. | `bool` | `false` | no |
94-
| <a name="input_runner_architecture"></a> [runner\_architecture](#input\_runner\_architecture) | The platform architecture for the runner instance (x64, arm64), defaults to 'x64' | `string` | `"x64"` | no |
94+
| <a name="input_runner_architecture"></a> [runner\_architecture](#input\_runner\_architecture) | The platform architecture of the runner instance\_type. | `string` | `"x64"` | no |
9595
| <a name="input_runner_os"></a> [runner\_os](#input\_runner\_os) | The operating system for the runner instance (linux, win), defaults to 'linux' | `string` | `"linux"` | no |
9696
| <a name="input_server_side_encryption_configuration"></a> [server\_side\_encryption\_configuration](#input\_server\_side\_encryption\_configuration) | Map containing server-side encryption configuration. | `any` | `{}` | no |
9797
| <a name="input_syncer_lambda_s3_key"></a> [syncer\_lambda\_s3\_key](#input\_syncer\_lambda\_s3\_key) | S3 key for syncer lambda function. Required if using S3 bucket to specify lambdas. | `any` | `null` | no |

modules/runner-binaries-syncer/variables.tf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,16 @@ variable "runner_os" {
6161
}
6262

6363
variable "runner_architecture" {
64-
description = "The platform architecture for the runner instance (x64, arm64), defaults to 'x64'"
64+
description = "The platform architecture of the runner instance_type."
6565
type = string
6666
default = "x64"
67+
validation {
68+
condition = anytrue([
69+
var.runner_architecture == "x64",
70+
var.runner_architecture == "arm64",
71+
])
72+
error_message = "`runner_architecture` value not valid, valid values are: `x64` and `arm64`."
73+
}
6774
}
6875

6976
variable "logging_retention_in_days" {

0 commit comments

Comments
 (0)