- Notifications
You must be signed in to change notification settings - Fork 687
feat(control-plane): [issue-4833] AWS SSM Parameter store tags #4834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces support for tagging AWS SSM Parameter Store parameters by adding a new parameter_store_tags variable that allows users to specify custom tags to be applied to all SSM parameters created by the Lambda functions.
- Adds a new
parameter_store_tagsvariable across all modules to accept user-defined tags - Updates Lambda functions to read and apply these tags when creating SSM parameters
- Transforms the tag map into the required format for AWS SSM API calls
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| variables.tf | Adds new parameter_store_tags variable definition at root level |
| modules/runners/variables.tf | Adds parameter_store_tags variable to runners module |
| modules/runners/local.tf | Creates local transformation to convert tag map to AWS format |
| modules/runners/scale-up.tf | Passes transformed tags to scale-up Lambda environment |
| modules/runners/pool/ | Updates pool module to handle parameter store tags |
| modules/multi-runner/ | Adds parameter store tags support to multi-runner module |
| main.tf | Passes parameter store tags variable to runners module |
| lambdas/ | Updates Lambda functions to parse and apply tags to SSM parameters |
| README.md files | Updates documentation to include new parameter store tags variable |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| timeout = number | ||
| zip = string | ||
| subnet_ids = list(string) | ||
| parameter_store_tags = string |
Copilot AI Oct 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type for parameter_store_tags should be map(string) to match the variable definition in other modules, not string.
| parameter_store_tags = string | |
| parameter_store_tags = map(string) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lambda function environment variable only accepts string, map value is converted into string at https://github.com/github-aws-runners/terraform-aws-github-runner/pull/4834/files/7361092dac821cbf6679bc7ae8966f1288b26169#diff-5c6c370f29fac62114adf0ecc2806bc009702bcf32f96bad61a8d40c17448462
| : []; | ||
| const ssmParameterStoreTags = process.env.SSM_PARAMETER_STORE_TAGS | ||
| ? JSON.parse(process.env.SSM_PARAMETER_STORE_TAGS) | ||
| : {}; |
Copilot AI Oct 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value should be an empty array [] instead of an empty object {} to match the expected type structure used in the scale-up function and maintain consistency.
| : {}; | |
| : []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
| @wadherv thx for your PR, I wont have no option to check open PRs till the end of the month, sorry for the delay |
| Working my way to my backlog, thx for the reminder |
| @@ -0,0 +1,5 @@ | |||
| locals { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wadherv sorry for the long wait. Just test the PR with a small adjustment. But would first discuss the intended working.
I see a fewo options, but looking for use cases.
- Just apply the values in var.tags to the paramters. Most simple approach.
- Allow users two set custom tags for the pramaters, which are applied instead of adding the defautl from var.tgas. But for this I looking for a use case.
I have adjust the this local.tf file for a quick check, optiotn 2.
locals { parameter_store_tags = "[${join(", ", [ for key, value in length(var.parameter_store_tags) > 0 ? var.parameter_store_tags : var.tags : "{ key = \"${key}\", value = \"${value}\" }" ])}]" } In this case paramters got the valures from var.tags applices. Since I have not set parameter_store_tags.
What do you think. Are you looking for way have custom tags, or just getting the standard tags applices. When only adding the standard tag set in the module, we could even drop the introduced paramter (reducing complexity) and simply inject var.tags into the lambda.
Introducing a new variable
parameter_store_tagsto add tags for all the SSM Parameter Store resources created via Scale-Up and Pool lambda function.