-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: Attach ssm permissions to ecs fargate job module #407
Conversation
aws-ecs-job-fargate/variables.tf
Outdated
variable "ssm_arn" { | ||
type = string | ||
default = null | ||
description = "Parameter Store ARN" |
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.
description = "Parameter Store ARN" | |
description = "SSM Parameter Store ARN. If present, allows ECS task to make ssm:GetParameters call." |
aws-ecs-job-fargate/iam.tf
Outdated
"ssm:GetParameters", | ||
] | ||
|
||
resources = [var.ssm_arn] |
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.
resources = [var.ssm_arn] | |
resources = var.ssm_parameter_store_arns |
I'd make this a list so that we're granting access to specific keys in Parameter Store. Even though you can somewhat achieve the same behavior by providing an ARN prefix, I think this is much more flexible.
d7f2dc8
to
21c66f9
Compare
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.
Thanks for reviewing @michaelmcchen! @tapanr lmk if you need a release after this
Adding an option to attach ssm permission to ecs fargate job module. This option can be used when the task running in ECS Fargate needs to use parameter store to retrieve secret credentials.
Background on why we needed this: We plan to deploy a docker image on ECS Fargate which needs to set some authentication credentials as its environment variables. Since these are confidential credentials, we have stored them in parameter store and hence ECS task needs access to that store to retrieve them.