Skip to content

Commit

Permalink
Merge pull request #678 from aereal/ssm-get-parameters
Browse files Browse the repository at this point in the history
fix: use GetParameters instead of GetParameter to simulate actual ECS' behavior
  • Loading branch information
fujiwara authored Mar 19, 2024
2 parents ec85dec + 416147e commit 7143a5f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/iam-policy-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"logs:GetLogEvents",
"secretsmanager:GetSecretValue",
"servicediscovery:GetNamespace",
"ssm:GetParameter",
"ssm:GetParameters",
"sts:AssumeRole"
],
"Resource": "*"
Expand Down
1 change: 0 additions & 1 deletion tests/terraform/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ resource "aws_iam_policy" "ecs-task-execution" {
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents",
"ssm:GetParameter",
"ssm:GetParameters",
"secretsmanager:GetSecretValue",
]
Expand Down
4 changes: 2 additions & 2 deletions verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ func (v *verifier) existsSecretValue(ctx context.Context, from string) error {
} else {
name = from
}
_, err := v.ssm.GetParameter(ctx, &ssm.GetParameterInput{
Name: &name,
_, err := v.ssm.GetParameters(ctx, &ssm.GetParametersInput{
Names: []string{name},
WithDecryption: aws.Bool(true),
})
if err != nil {
Expand Down

0 comments on commit 7143a5f

Please sign in to comment.