noqdev / iambic

IAMbic is Version-Control for IAM. It centralizes and simplifies cloud access and permissions. It maintains an eventually consistent, human-readable, bi-directional representation of IAM in Git.
https://iambic.org
Apache License 2.0
285 stars 26 forks source link

iambic setup does not instruct the user regarding their AWS account cannot be use to setup AWS Organization #610

Open smoy opened 1 year ago

smoy commented 1 year ago

Describe the bug iambic setup expects user to be in an AWS Organization management account when they setup an AWS organization. iambic setup should try to detect if its in a member account in order to raise the appropriate message for the user to use the correct account.

To Reproduce Steps to reproduce the behavior:

  1. Export credentials of a organization member account
  2. Run iambic setup on a new folder (just so it assumes nothing has setup yet)
  3. What would you like to configure? AWS
  4. What region should IAMbic use? us-east-1
  5. ? Which Account ID should we use to deploy the IAMbic hub role? <auto detect of current credentials<
  6. ? Would you like to use this identity? Yes
  7. ? What would you like to configure in AWS? AWS Organizations
  8. If you would like to use AWS Organizations, the IAMbic hub account you configured must be the same AWS account as your AWS Organization. ? Is this the case? Yes <-- at this point it should already know that I am using a member account. and raise the appropriate instruction.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Community Engagement Your vote counts! Please support this bug report by adding a 👍 reaction to the original issue, which will aid the community and maintainers in addressing this problem.

Please refrain from adding "+1" or "me too" comments, as these create unnecessary noise for issue followers and do not help in prioritizing the issue. If you wish to contribute to solving this issue or have submitted a pull request, please leave a comment.