-
Notifications
You must be signed in to change notification settings - Fork 348
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
aws_ec2 inventory plugin does not assume role before trying to find default regions #566
Comments
Hi @jw-maynard |
Hey @abikouo I'm not really familiar with how I could use the plugin from the PR on our AWX instance where we run our Ansilbe usually. I'll see what I can do. Looking at the code it seems like it should solve the issue. |
…ibe regions (#624) inventory aws_ec2 - assume role using iam_role_arn parameter to describe regions SUMMARY This is a proposal to solve #566 ISSUE TYPE Feature Pull Request COMPONENT NAME aws_ec2 Reviewed-by: Alina Buzachis <None> Reviewed-by: Markus Bergholz <[email protected]>
…ibe regions (#624) inventory aws_ec2 - assume role using iam_role_arn parameter to describe regions SUMMARY This is a proposal to solve #566 ISSUE TYPE Feature Pull Request COMPONENT NAME aws_ec2 Reviewed-by: Alina Buzachis <None> Reviewed-by: Markus Bergholz <[email protected]> (cherry picked from commit 56e6e69)
…ibe regions (#624) inventory aws_ec2 - assume role using iam_role_arn parameter to describe regions SUMMARY This is a proposal to solve #566 ISSUE TYPE Feature Pull Request COMPONENT NAME aws_ec2 Reviewed-by: Alina Buzachis <None> Reviewed-by: Markus Bergholz <[email protected]> (cherry picked from commit 56e6e69)
…ibe regions (#624) (#725) [PR #624/56e6e69f backport][stable-2] inventory aws_ec2 - assume role using iam_role_arn parameter to describe regions This is a backport of PR #624 as merged into main (56e6e69). SUMMARY This is a proposal to solve #566 ISSUE TYPE Feature Pull Request COMPONENT NAME aws_ec2
…ibe regions (#624) (#726) [PR #624/56e6e69f backport][stable-3] inventory aws_ec2 - assume role using iam_role_arn parameter to describe regions This is a backport of PR #624 as merged into main (56e6e69). SUMMARY This is a proposal to solve #566 ISSUE TYPE Feature Pull Request COMPONENT NAME aws_ec2
@jw-maynard PR has been merged, I am closing this, feel to reopen if the issue occurred again. |
Summary
In _boto3_conn the code that tries to get the default regions if the regions configuration is not set does not use the
iam_role_arn
configuration parameter to assume the role before trying to call DescribeRegions. While this isn't a problem per say as the regions are the same no matter what role you're assuming, it could causes confusion if the role specified iniam_role_arn
has the ec2:DescribeRegions IAM permission but the role that ansible-inventory is running as does not.Issue Type
Bug Report
Component Name
awx_ec2 inventory plugin
Ansible Version
Collection Versions
$ ansible-galaxy collection list
Not sure, running this in AWX
AWS SDK versions
$ pip show boto boto3 botocore
Not sure, running this in AWX
Configuration
$ ansible-config dump --only-changed
OS / Environment
Not sure, running this in AWX
Steps to Reproduce
iam_role_arn
set to the role created in 2.Expected Results
I expect that the plugin should used the role configured in
iam_role_arn
for all AWS api calls it needs to make other than the obvious STS calls needed to assume that role.Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: