Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
wadherv wants to merge8 commits intogithub-aws-runners:main
base:main
Choose a base branch
Loading
fromwadherv:main

Conversation

@wadherv
Copy link
Contributor

Introducing a new variableparameter_store_tags to add tags for all the SSM Parameter Store resources created via Scale-Up and Pool lambda function.

@wadhervwadherv requested review froma team ascode ownersOctober 19, 2025 13:26
@wadhervwadherv marked this pull request as draftOctober 19, 2025 13:39
@wadhervwadherv marked this pull request as ready for reviewOctober 20, 2025 06:59
@npalmnpalm requested a review fromCopilotOctober 20, 2025 07:03
Copy link
Contributor

CopilotAI left a 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 newparameter_store_tags variable that allows users to specify custom tags to be applied to all SSM parameters created by the Lambda functions.

  • Adds a newparameter_store_tags variable 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
FileDescription
variables.tfAdds newparameter_store_tags variable definition at root level
modules/runners/variables.tfAddsparameter_store_tags variable to runners module
modules/runners/local.tfCreates local transformation to convert tag map to AWS format
modules/runners/scale-up.tfPasses 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.tfPasses parameter store tags variable to runners module
lambdas/Updates Lambda functions to parse and apply tags to SSM parameters
README.md filesUpdates documentation to include new parameter store tags variable

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

timeout=number
zip=string
subnet_ids=list(string)
parameter_store_tags=string

Choose a reason for hiding this comment

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

The type forparameter_store_tags should bemap(string) to match the variable definition in other modules, notstring.

Suggested change
parameter_store_tags=string
parameter_store_tags=map(string)

Copilot uses AI. Check for mistakes.
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

:[];
constssmParameterStoreTags=process.env.SSM_PARAMETER_STORE_TAGS
?JSON.parse(process.env.SSM_PARAMETER_STORE_TAGS)
:{};

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.

Suggested change
:{};
:[];

Copilot uses AI. Check for mistakes.
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

fixed

@npalm
Copy link
Member

@wadherv thx for your PR, I wont have no option to check open PRs till the end of the month, sorry for the delay

@wadherv
Copy link
ContributorAuthor

@wadherv thx for your PR, I wont have no option to check open PRs till the end of the month, sorry for the delay

@npalm if you’ve got a moment, could you take a look at my PR? Would really appreciate it!

npalm reacted with thumbs up emoji

@wadhervwadherv requested a review fromnpalmNovember 2, 2025 14:31
@npalm
Copy link
Member

Working my way to my backlog, thx for the reminder

@@ -0,0 +1,5 @@
locals {
Copy link
Member

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.

  1. Just apply the values in var.tags to the paramters. Most simple approach.
  2. 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.

Copy link
ContributorAuthor

@wadhervwadhervNov 6, 2025
edited
Loading

Choose a reason for hiding this comment

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

@npalm For my requirement, I want to apply only the default set of tags to the SSM Parameter Store, while also providing users the option to add additional custom tags specific to SSM Parameter resources.
Now that you have highlighted this, may be a better way is to merge var.tags and var.parameter_store_tags so that it work as intended(similar tohttps://github.com/github-aws-runners/terraform-aws-github-runner/blob/main/modules/runners/variables.tf#L716).
Let me know if this sounds reasonable, and i can make the required code changes.

Copy link
ContributorAuthor

@wadhervwadhervNov 7, 2025
edited
Loading

Choose a reason for hiding this comment

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

Something like below:
locals {
parameter_store_tags = "[${join(", ", [
for key, value in merge(var.tags, var.parameter_store_tags) : "{ key = "${key}", value = "${value}" }"
])}]"
}

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@npalmnpalmnpalm left review comments

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@wadherv@npalm

[8]ページ先頭

©2009-2025 Movatter.jp