Skip to content

fix(runner): handle long prefixes in pool scheduler and IAM resource names - #5139

Merged
edersonbrilhante merged 1 commit into
github-aws-runners:mainfrom
alexjurkiewicz:fix/pool-name-prefix-length
Jul 4, 2026
Merged

fix(runner): handle long prefixes in pool scheduler and IAM resource names#5139
edersonbrilhante merged 1 commit into
github-aws-runners:mainfrom
alexjurkiewicz:fix/pool-name-prefix-length

Conversation

@alexjurkiewicz

@alexjurkiewicz alexjurkiewicz commented May 28, 2026

Copy link
Copy Markdown
Contributor

The pool module's aws_scheduler_schedule_group and aws_iam_role for the scheduler both use name_prefix, which has a 38-character limit (64 max name minus 26 for Terraform's random suffix). When the module prefix is long — for example a multi-runner prefix like self-hosted-linux-ubuntu2404-x64-2cpu-8gb — the combined ${prefix}-pool exceeds 38 characters and Terraform fails.

For long prefixes, the name is now truncated with an md5 hash suffix to stay within limits, matching the existing pattern used elsewhere in the module. Existing deployments with short prefixes see no resource changes.

@alexjurkiewicz
alexjurkiewicz requested a review from a team as a code owner May 28, 2026 13:08

@edersonbrilhante edersonbrilhante left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexjurkiewicz Please sign the commits

…names

The pool module's aws_scheduler_schedule_group and aws_iam_role for the
scheduler both use name_prefix, which has a 38-character limit. When the
module prefix is long (e.g. via multi-runner map keys), this limit is
exceeded and Terraform fails.

Add a local that passes the prefix through unchanged when it fits, and
falls back to a truncated prefix with an md5 hash suffix when it
exceeds 38 characters. This matches the existing pattern used for the
pool lambda IAM role on line 80.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@alexjurkiewicz
alexjurkiewicz force-pushed the fix/pool-name-prefix-length branch from f84ba0c to d268e61 Compare July 4, 2026 00:23
@alexjurkiewicz

Copy link
Copy Markdown
Contributor Author

Done, and rebased too

@edersonbrilhante
edersonbrilhante merged commit 76a572a into github-aws-runners:main Jul 4, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants