From 3fa5896301e1b3042e7d06babab636daa453d339 Mon Sep 17 00:00:00 2001 From: Brandon Liles Date: Tue, 28 Dec 2021 10:52:59 -0500 Subject: [PATCH] feat: Support t4g Graviton instance type (#1561) --- README.md | 6 +++--- main.tf | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 86354d19cd..5c1719a616 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ To be able to support a number of use-cases the module has quite a lot configura #### ARM64 support via Graviton/Graviton2 instance-types -When using the default example or top-level module, specifying an `instance_type` that matches a Graviton/Graviton 2 (ARM64) architecture (e.g. a1 or any 6th-gen `g` or `gd` type), the sub-modules will be automatically configured to provision with ARM64 AMIs and leverage GitHub's ARM64 action runner. See below for more details. +When using the default example or top-level module, specifying an `instance_type` that matches a Graviton/Graviton 2 (ARM64) architecture (e.g. a1, t4g or any 6th-gen `g` or `gd` type), the sub-modules will be automatically configured to provision with ARM64 AMIs and leverage GitHub's ARM64 action runner. See below for more details. ## Usages @@ -202,7 +202,7 @@ module "github-runner" { } ``` -**ARM64** support: Specify an `a1` or `*6g*` (6th-gen Graviton2) instance type to stand up an ARM64 runner, otherwise the default is x86_64. +**ARM64** support: Specify an `a1`, `t4g` or `*6g*` (6th-gen Graviton2) instance type to stand up an ARM64 runner, otherwise the default is x86_64. Run terraform by using the following commands @@ -347,7 +347,7 @@ The following sub modules are optional and are provided as example or utility: ### ARM64 configuration for submodules -When not using the top-level module and specifying an `a1` 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. +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. When configuring `runner-binaries-syncer` diff --git a/main.tf b/main.tf index 4d9f60dc97..30745fa6f4 100644 --- a/main.tf +++ b/main.tf @@ -5,7 +5,7 @@ locals { }) s3_action_runner_url = "s3://${module.runner_binaries.bucket.id}/${module.runner_binaries.runner_distribution_object_key}" - runner_architecture = substr(var.instance_type, 0, 2) == "a1" || substr(var.instance_type, 1, 2) == "6g" ? "arm64" : "x64" + runner_architecture = substr(var.instance_type, 0, 2) == "a1" || substr(var.instance_type, 0, 3) == "t4g" || substr(var.instance_type, 1, 2) == "6g" ? "arm64" : "x64" github_app_parameters = { id = module.ssm.parameters.github_app_id key_base64 = module.ssm.parameters.github_app_key_base64