Skip to content
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: Have an ability to configure session name #29

Conversation

cychiang
Copy link
Contributor

Hi,

I submit this PR for an ability to configure role session name after assuming a role with configure-aws-credentials Actions.

The story behind this PR is, recently, AWS has released a new feature for IAM - "CalledVia." It's a cool feature and no need to give extra write permissions to people to create stacks with CloudFormation. Now, we are changing our way of working by integrating GitHub Actions to deploy CloudFormation templates, but also want to know who update templates by using AWS CloudTrail.

We figure out the CloudTrail will take session name as user name. Therefore we want to have a configurable session name to tag meaningful information on it instead of GitHubActions.

2. Configure roleSessionName with role-session-name from action or default value (GitHubActions)
@cychiang cychiang changed the title feature: configurable session name Have an ability to configure session name Feb 28, 2020
@cychiang cychiang changed the title Have an ability to configure session name feat: Have an ability to configure session name Feb 28, 2020
Copy link
Member

@clareliguori clareliguori left a comment

Choose a reason for hiding this comment

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

Thanks for contributing! Can you add a unit test to index.test.js to test this behavior?

action.yml Outdated
@@ -25,6 +25,9 @@ inputs:
role-duration-seconds:
description: "Role duration in seconds (default: 6 hours)"
required: false
role-session-name:
description: 'Role Session Name (default: GitHubActions)'
Copy link
Member

Choose a reason for hiding this comment

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

Nit:

Suggested change
description: 'Role Session Name (default: GitHubActions)'
description: 'Role session name (default: GitHubActions)'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem! I have updated the code based on your suggestions. The test code is ready and looks good, let me know if need more improvements. 😄

@clareliguori clareliguori merged commit 4d0082a into aws-actions:master Mar 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants