Skip to content

Conversation

@edersonbrilhante
Copy link
Contributor

Description

This PR adds support for configuring EC2 placement groups for GitHub Actions runners in the multi-runner module. It plumbs a new placement option from the runner configuration through to the underlying EC2 runner module.

Details

Updated modules/multi-runner/runners.tf to pass placement = each.value.runner_config.placement into the runners module.
This allows specifying AWS placement groups for EC2 runners, enabling tighter control over instance placement.
The change is backwards compatible: if placement is unset in runner_config, behavior remains unchanged.

Motivation / Future work

Placement groups are a prerequisite for supporting macOS runners, which require a host_id.
A follow-up PR will add explicit macOS support leveraging this new placement wiring.

placement = optional(object({
affinity = optional(string)
availability_zone = optional(string)
# group_id = try(placement.value.group_id, null) # aws >= 6.12.0
Copy link
Member

Choose a reason for hiding this comment

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

Why is the comment. Requiring a newer version of the provider?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The provider aws also allow to use group ID in placement, but only not in all versions. I left the commented so it can be added in the future. I can remove if is misleading

Copy link
Member

Choose a reason for hiding this comment

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

I will release next week a new major version, including bump of aws provider, and update to node24. You could update the PR to merge in next instead of main.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing.

Copy link
Member

@npalm npalm left a comment

Choose a reason for hiding this comment

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

Looks good, small question

@edersonbrilhante edersonbrilhante changed the base branch from main to next December 7, 2025 11:23
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