Skip to content

Add overrides for source_profile and mfa_serial to add-profiles subcommand #83

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

Merged
merged 1 commit into from
Jul 21, 2020

Conversation

chrisgilmerproj
Copy link

@chrisgilmerproj chrisgilmerproj commented Jul 21, 2020

The previous iteration of the setup-new-aws-user add-profile subcommand relied on copying values for source_profile and mfa_serial from an existing AWS profile in ~/.aws/config. This is not ideal when you wish to customize one or the other or both of those values. Now you can run this command in several ways to get the desired output:

With only the existing AWS profile provided:

go run ./cmd/ add-profile --aws-profile trussworks-org-root --iam-role OrganizationAccountAccessRole --aws-profile-account trussworks-cgilmer:123456789012

With one of either source-profile or mfa-serial provided along with the existing AWS Profile:

go run ./cmd/ add-profile --aws-profile trussworks-org-root --source-profile trussworks-org-root --iam-role OrganizationAccountAccessRole --aws-profile-account trussworks-cgilmer:123456789012

WIth both the source-profile and mfa-serial names provided:

go run ./cmd/ add-profile --source-profile trussworks-org-root --mfa-serial arn:aws:iam::123456789012:mfa/cgilmer.org-root --iam-role OrganizationAccountAccessRole --aws-profile-account trussworks-cgilmer:123456789012

I plan to release this as v0.5.2.

@chrisgilmerproj chrisgilmerproj requested a review from a team July 21, 2020 21:38
@chrisgilmerproj chrisgilmerproj self-assigned this Jul 21, 2020
Copy link
Contributor

@eeeady eeeady left a comment

Choose a reason for hiding this comment

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

Looks good to me. Works locally and doesn't break any existing tests.

@chrisgilmerproj chrisgilmerproj merged commit 2d8eccf into master Jul 21, 2020
@chrisgilmerproj chrisgilmerproj deleted the cg_overrides_for_profiles branch July 21, 2020 23:42
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