-
Notifications
You must be signed in to change notification settings - Fork 154
feat: Add support for task and execution role ARNs in action.yml and … #293
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: master
Are you sure you want to change the base?
Conversation
Hi @DMEvanCT, thank you so much for your contribution. Apologies on the delay. We will be working on reviewing Pull Requests on the repositories. In the mean time please ensure that below steps, if not already done, are taken care of in your PR:
|
} | ||
containerDef.image = imageURI; | ||
|
||
|
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.
nit: could you remove unnecessary whitespace?
const command = core.getInput('command', { required: false }); | ||
const taskRoleArn = core.getInput('task-role-arn', { required: false }); | ||
const executionRoleArn = core.getInput('execution-role-arn', { required: false }); | ||
|
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.
nit: could you remove unnecessary whitespace?
description: 'The ARN of the IAM role that the ECS container will assume' | ||
required: false | ||
execution-role-arn: | ||
description: 'The ARN of the IAM role that the ECS task execution role will assume' |
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.
This description can be made more explicit, as it could confuse some users since it's self-referencing.
Suggested reword: 'The ARN of the IAM role that the task definition will assume to run the task'
} | ||
|
||
if (taskRoleArn) { | ||
taskDefContents.taskRoleArn = taskRoleArn; |
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.
Can we add a regex validation for the arn? Need appropriate unit tests as well for these changes.
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.
ECS actually allows name-only format (if the role is in the same account as the task definition), and we rely on that to deploy the same task definition across multiple accounts.
taskDefContents.taskRoleArn = taskRoleArn; | ||
} | ||
|
||
if (executionRoleArn) { |
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.
Can we add a regex validation for the arn? Need appropriate unit tests as well for these changes.
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.
ECS actually allows name-only format (if the role is in the same account as the task definition), and we rely on that to deploy the same task definition across multiple accounts.
…index.js
Issue #, if available:
Description of changes:
Adding the ability to do set task role arn and the execution role arn. This may be different from account to account so setting it would provide a little flexibility.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.