-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
To fix the issue when it use assume role to create EC2 instance #52572
Conversation
agree, this should be better. Co-Authored-By: changyong <[email protected]>
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.
@changyong Is there test coverage for this change?
@dwoz I didn't write test code but tested it manually: I executed following three test cases to verify the code changes and all the tests pass, it can create EC2 instances successfully:
provider settings:
output logs:
provider settings:
output logs: test52501-instance-role-provider.log
provider settings:
output logs: test52501-assume-role-provider.log The test-profile.conf profile file context is:
BTW, I replaced some sensitive info in the settings and logs. |
Issue #52501 is still broken (not certain why it was closed) and this fix is still applicable. Was there any particular approach to a unit test that was needed to get this merged? I am currently impacted by this across 5 AWS accounts. |
I am also interested in seeing this moving forward as it will affect me soon. |
@changyong In order for this to get in it needs to be rebased against the master branch and it needs to have tests written for it. |
@major0 let's rebase this against master and write some tests, are you willing to help? |
Discussed in Grooming on 2021-APR-05 and 2021-APR-19 and followed up with @major0 about closing this PR. I will wait 2 more weeks and if no response or work I will close. |
Reviewed in Grooming 2021-MAY-03 keeping it open for @major0, needs test coverage and rebased against master branch, removing from grooming project |
Has anyone had a chance on getting the test required to merge this in? It would be a super nice fix to have. |
Anyone willing to push this PR to completion? |
Closing due to inactivity. Please let me know if you want me to re-open this PR or open a new PR against the master branch including the feedback in the PR |
What does this PR do?
To fix the issue when it use assume role to create AWS resources in another AWS account. The issue in #52501 is because when the variable
__Expiration__
isn't equal to '', it will always return from the function directly. It won't have chance to executeprovider.get('role_arn')
and then get credential from assume role again.What issues does this PR fix or reference?
Fix #52501
Tests written?
No
Commits signed with GPG?
No