From bab13e39482315d371901d5be5861c042b6f5092 Mon Sep 17 00:00:00 2001 From: Gabriele Bozzola Date: Wed, 29 Oct 2025 13:42:59 -0700 Subject: [PATCH] fix(runners): support for AMIs with parentheses in the name Some AMIs, like the `AWS Deep Learning Base GPU AMI (Ubuntu 24.04)`, have parentheses in the name. Parentheses are not allowed in SSM tags, leading to an error. This commit strips the parentheses out of the name. --- modules/runners/main.tf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/runners/main.tf b/modules/runners/main.tf index 7184b08ee0..68365f2280 100644 --- a/modules/runners/main.tf +++ b/modules/runners/main.tf @@ -102,7 +102,8 @@ resource "aws_ssm_parameter" "runner_ami_id" { tags = merge( local.tags, { - "ghr:ami_name" = data.aws_ami.runner.name + # Remove parentheses from AMI name to comply with AWS tag constraints + "ghr:ami_name" = replace(data.aws_ami.runner.name, "/[()]/", "") }, { "ghr:ami_creation_date" = data.aws_ami.runner.creation_date