Skip to content

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

Open
alexjurkiewicz wants to merge 1 commit into
github-aws-runners:mainfrom
alexjurkiewicz:fix/pool-name-prefix-length
Open

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

Conversation

@alexjurkiewicz
Copy link
Copy Markdown
Contributor

@alexjurkiewicz alexjurkiewicz commented May 28, 2026

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.

…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 requested a review from a team as a code owner May 28, 2026 13:08
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.

1 participant