Skip to content

Commit 2904a10

Browse files
Sbozzolonpalm
andauthored
fix(runners): support for AMIs with parentheses in the name (#4856)
Some AMIs, like the `AWS Deep Learning Base GPU AMI (Ubuntu 24.04)`, have parentheses in the name. Parentheses are not allowed in AWS tags, leading to an error. This commit strips the parentheses out of the name. Co-authored-by: Niek Palm <npalm@users.noreply.github.com>
1 parent ceb1182 commit 2904a10

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/runners/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ resource "aws_ssm_parameter" "runner_ami_id" {
102102
tags = merge(
103103
local.tags,
104104
{
105-
"ghr:ami_name" = data.aws_ami.runner.name
105+
# Remove parentheses from AMI name to comply with AWS tag constraints
106+
"ghr:ami_name" = replace(data.aws_ami.runner.name, "/[()]/", "")
106107
},
107108
{
108109
"ghr:ami_creation_date" = data.aws_ami.runner.creation_date

0 commit comments

Comments
 (0)