Skip to content

Commit 1a7158b

Browse files
npalmclaude
andauthored
fix: add SSM AMI parameter permissions and environment-based naming (#5016)
This pull request introduces environment-specific configuration improvements and updates IAM policy resources to support new SSM parameters. The main changes focus on making resource naming more flexible and ensuring the Lambda scale-up policy has access to the necessary SSM parameters. Configuration improvements: * Updated the `al2023_arm64_name` local in `examples/multi-runner/main.tf` to include the environment variable, making AMI name paths environment-specific for better isolation and flexibility. IAM policy updates: * Added `${ssm_ami_id_parameter_arn}` to the resource list in `modules/runners/policies/lambda-scale-up.json`, allowing Lambda scale-up operations to access the new SSM parameter for AMI IDs. This solve errors related handling batches --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent c638e38 commit 1a7158b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

examples/multi-runner/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ locals {
2828
aws_region = var.aws_region
2929

3030
# create map only with amazon linux 2023 x64 and arm64 to overwrite the default
31-
al2023_arm64_name = "/examples/multi-runner/aws-github-runners/ami/amazon-linux-2023-arm64"
31+
al2023_arm64_name = "/${local.environment}/examples/multi-runner/aws-github-runners/ami/amazon-linux-2023-arm64"
3232
ssm_ami_arns = {
3333
"linux-x64" = data.aws_ssm_parameter.al2023_x64.arn
3434
# construct the arn to avoid terraform count errors

modules/runners/policies/lambda-scale-up.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"Resource": [
3636
"${github_app_key_base64_arn}",
3737
"${github_app_id_arn}",
38-
"${ssm_config_path}/*"
38+
"${ssm_config_path}/*",
39+
"${ssm_ami_id_parameter_arn}"
3940
]
4041
},
4142
{

0 commit comments

Comments
 (0)