Skip to content

feat: support multiple SSM parameters for large runner matcher configs (#4790) - #4792

Merged
npalm merged 17 commits into
github-aws-runners:mainfrom
edersonbrilhante:feat-ssm-runner-matcher-chunking
Nov 13, 2025
Merged

feat: support multiple SSM parameters for large runner matcher configs (#4790)#4792
npalm merged 17 commits into
github-aws-runners:mainfrom
edersonbrilhante:feat-ssm-runner-matcher-chunking

Conversation

@edersonbrilhante

Copy link
Copy Markdown
Contributor

PR Description

Implements support for splitting the runner matcher configuration across multiple SSM parameters.
PARAMETER_RUNNER_MATCHER_CONFIG_PATH can now accept multiple parameter paths separated by a colon (:).

This avoids SSM size limits for large configurations and improves scalability for environments with many runner types and labels.

Closes #4790

@edersonbrilhante
edersonbrilhante requested a review from a team as a code owner September 25, 2025 22:31
@github-actions
github-actions Bot requested a review from a team as a code owner October 3, 2025 10:50
Comment thread lambdas/functions/webhook/src/ConfigLoader.test.ts Outdated

@npalm npalm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@edersonbrilhante nice contribution. I just tried the parameter split with the multi-runner example in this repo. By adding a few config and adding more labes. Result is I got this error, related to the added foreach

│
│   on ../../modules/webhook/webhook.tf line 27, in resource "aws_ssm_parameter" "runner_matcher_config":
│   27:   for_each = { for idx, val in local.matcher_chunks : idx => val }
│     ├────────────────
│     │ local.matcher_chunks will be known only after apply
│
│ The "for_each" map includes keys derived from resource attributes that cannot be determined until apply, and so Terraform cannot determine the full set of keys that will
│ identify the instances of this resource.
│
│ When working with unknown values in for_each, it's better to define the map keys statically in your configuration and place apply-time results only in the map values.
│
│ Alternatively, you could use the -target planning option to first apply only the resources that the for_each value depends on, and then apply a second time to fully
│ converge.

Wondering you you tested the change? I was not able to get it working right now.

@edersonbrilhante

Copy link
Copy Markdown
Contributor Author

I did test it, but I forgot to include a large configuration and only tested the normal case. My bad. I found the same bug now.

@edersonbrilhante

Copy link
Copy Markdown
Contributor Author

@npalm I just pushed my fix. I tested a normal config and a tested a really big one with 7 ssm resources and it worked fine now.

@edersonbrilhante

edersonbrilhante commented Oct 3, 2025

Copy link
Copy Markdown
Contributor Author

@npalm Also, during this fix I found 1 bug created the last release.
Check this PR #4806

Comment thread modules/webhook/webhook.tf Outdated
@npalm

npalm commented Oct 8, 2025

Copy link
Copy Markdown
Member

Thx for the updates, will not be able to able to get the PR merged in the next weeks. I will catch up end of the month. Sorry for tthe delay.

@edersonbrilhante

Copy link
Copy Markdown
Contributor Author

No problem. :)

@Brend-Smits
Brend-Smits requested a review from Copilot October 14, 2025 12:35

Copilot AI 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.

Pull Request Overview

Implements support for splitting the runner matcher configuration across multiple SSM parameters to avoid size limits for large configurations. The primary change allows PARAMETER_RUNNER_MATCHER_CONFIG_PATH to accept multiple parameter paths separated by a colon.

  • Added logic to split large runner matcher configurations into chunks based on SSM parameter tier limits
  • Updated infrastructure to create multiple SSM parameters when needed and pass them as a list
  • Modified configuration loader to handle multiple parameter paths and combine them at runtime

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
modules/webhook/webhook.tf Implements chunking logic and creates multiple SSM parameters for large configs
modules/webhook/eventbridge/webhook.tf Updates environment variable to join multiple parameter paths with colons
modules/webhook/eventbridge/variables.tf Changes ssm_parameter_runner_matcher_config from object to list of objects
modules/webhook/eventbridge/dispatcher.tf Updates IAM policy and environment variables to handle multiple parameters
modules/webhook/direct/webhook.tf Updates environment variables to join multiple parameter paths with colons
modules/webhook/direct/variables.tf Changes ssm_parameter_runner_matcher_config from object to list of objects
lambdas/functions/webhook/src/ConfigLoader.ts Implements logic to load and combine configuration from multiple SSM parameters
lambdas/functions/webhook/src/ConfigLoader.test.ts Adds test coverage for multi-parameter configuration loading

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread lambdas/functions/webhook/src/ConfigLoader.ts
Comment thread lambdas/functions/webhook/src/ConfigLoader.ts
@Brend-Smits
Brend-Smits requested a review from npalm October 30, 2025 10:01

@npalm npalm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@edersonbrilhante took a while but tested and reviewed the PR.

  • I left some small comments, one permission needs to be dropped
  • can you have a look on the copilot suggestions as well
  • I have tested incrasing the matching resulting in a split. and down size back to a single matcher variable. All works like a hcarm.

Comment thread modules/webhook/eventbridge/dispatcher.tf Outdated
Comment thread modules/webhook/webhook.tf
@edersonbrilhante
edersonbrilhante force-pushed the feat-ssm-runner-matcher-chunking branch from 35d3f6d to d751541 Compare November 10, 2025 10:54
@edersonbrilhante
edersonbrilhante force-pushed the feat-ssm-runner-matcher-chunking branch from f8ef0cc to efc0ee2 Compare November 10, 2025 11:05
@edersonbrilhante
edersonbrilhante force-pushed the feat-ssm-runner-matcher-chunking branch from c6a2f6d to 5c6bf59 Compare November 10, 2025 11:35
@edersonbrilhante
edersonbrilhante force-pushed the feat-ssm-runner-matcher-chunking branch from b4d3e23 to 3098478 Compare November 10, 2025 12:28
@Brend-Smits
Brend-Smits requested a review from npalm November 10, 2025 13:00
@npalm

npalm commented Nov 10, 2025

Copy link
Copy Markdown
Member

Expect to have time later this week to re-review the PR. Thanks for the updates

@stuartp44 stuartp44 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.

Small feedback from me

Comment thread README.md Outdated
Comment thread modules/webhook/webhook.tf
@npalm
npalm dismissed stuartp44’s stale review November 13, 2025 19:51

change requested on generated files.

@npalm
npalm merged commit 4d4872f into github-aws-runners:main Nov 13, 2025
42 checks passed
npalm pushed a commit that referenced this pull request Nov 13, 2025
🤖 I have created a release *beep* *boop*
---


##
[6.9.0](v6.8.5...v6.9.0)
(2025-11-13)


### Features

* support multiple SSM parameters for large runner matcher configs
([#4790](#4790))
([#4792](#4792))
([4d4872f](4d4872f))
@edersonbrilhante


### Bug Fixes

* **lambda:** bump @octokit/rest from 22.0.0 to 22.0.1 in /lambdas in
the octokit group
([#4876](#4876))
([807aeef](807aeef))
* **lambda:** bump the aws group across 1 directory with 7 updates
([#4871](#4871))
([8737fe2](8737fe2))
* **lambda:** bump the aws-powertools group in /lambdas with 4 updates
([#4865](#4865))
([8c76e12](8c76e12))
* **lambda:** bump the octokit group across 1 directory with 4 updates
([#4873](#4873))
([39fc3cf](39fc3cf))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>
@edersonbrilhante
edersonbrilhante deleted the feat-ssm-runner-matcher-chunking branch November 13, 2025 20:42
@npalm

npalm commented Nov 20, 2025

Copy link
Copy Markdown
Member

@edersonbrilhante would you have time to have a look at this issue #4901. It seems this changes is breaking the module in some caes.

LudovicTOURMAN pushed a commit to doctolib-lab/terraform-aws-github-runner that referenced this pull request Apr 7, 2026
github-aws-runners#4790) (github-aws-runners#4792)

### **PR Description**

Implements support for splitting the runner matcher configuration across
multiple SSM parameters.
`PARAMETER_RUNNER_MATCHER_CONFIG_PATH` can now accept multiple parameter
paths separated by a colon (`:`).

This avoids SSM size limits for large configurations and improves
scalability for environments with many runner types and labels.

Closes github-aws-runners#4790

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Niek Palm <npalm@users.noreply.github.com>
LudovicTOURMAN pushed a commit to doctolib-lab/terraform-aws-github-runner that referenced this pull request Apr 7, 2026
🤖 I have created a release *beep* *boop*
---


##
[6.9.0](github-aws-runners/terraform-aws-github-runner@v6.8.5...v6.9.0)
(2025-11-13)


### Features

* support multiple SSM parameters for large runner matcher configs
([github-aws-runners#4790](github-aws-runners#4790))
([github-aws-runners#4792](github-aws-runners#4792))
([4d4872f](github-aws-runners@4d4872f))
@edersonbrilhante


### Bug Fixes

* **lambda:** bump @octokit/rest from 22.0.0 to 22.0.1 in /lambdas in
the octokit group
([github-aws-runners#4876](github-aws-runners#4876))
([807aeef](github-aws-runners@807aeef))
* **lambda:** bump the aws group across 1 directory with 7 updates
([github-aws-runners#4871](github-aws-runners#4871))
([8737fe2](github-aws-runners@8737fe2))
* **lambda:** bump the aws-powertools group in /lambdas with 4 updates
([github-aws-runners#4865](github-aws-runners#4865))
([8c76e12](github-aws-runners@8c76e12))
* **lambda:** bump the octokit group across 1 directory with 4 updates
([github-aws-runners#4873](github-aws-runners#4873))
([39fc3cf](github-aws-runners@39fc3cf))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>
zeekay pushed a commit to zeekay/terraform-aws-github-runner that referenced this pull request Sep 9, 2026
github-aws-runners#4790) (github-aws-runners#4792)

### **PR Description**

Implements support for splitting the runner matcher configuration across
multiple SSM parameters.
`PARAMETER_RUNNER_MATCHER_CONFIG_PATH` can now accept multiple parameter
paths separated by a colon (`:`).

This avoids SSM size limits for large configurations and improves
scalability for environments with many runner types and labels.

Closes github-aws-runners#4790

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Niek Palm <npalm@users.noreply.github.com>
zeekay pushed a commit to zeekay/terraform-aws-github-runner that referenced this pull request Sep 9, 2026
🤖 I have created a release *beep* *boop*
---


##
[6.9.0](github-aws-runners/terraform-aws-github-runner@v6.8.5...v6.9.0)
(2025-11-13)


### Features

* support multiple SSM parameters for large runner matcher configs
([github-aws-runners#4790](github-aws-runners#4790))
([github-aws-runners#4792](github-aws-runners#4792))
([8c6d969](github-aws-runners@8c6d969))
@edersonbrilhante


### Bug Fixes

* **lambda:** bump @octokit/rest from 22.0.0 to 22.0.1 in /lambdas in
the octokit group
([github-aws-runners#4876](github-aws-runners#4876))
([7d47a11](github-aws-runners@7d47a11))
* **lambda:** bump the aws group across 1 directory with 7 updates
([github-aws-runners#4871](github-aws-runners#4871))
([a72a6eb](github-aws-runners@a72a6eb))
* **lambda:** bump the aws-powertools group in /lambdas with 4 updates
([github-aws-runners#4865](github-aws-runners#4865))
([5186c30](github-aws-runners@5186c30))
* **lambda:** bump the octokit group across 1 directory with 4 updates
([github-aws-runners#4873](github-aws-runners#4873))
([8569700](github-aws-runners@8569700))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>
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.

SSM Parameter Size Limit Hit for Runner Matcher Config

5 participants