[v18] Add tsh aws-profile to Generate AWS Profiles from AWS Identity Center Integration#64590
[v18] Add tsh aws-profile to Generate AWS Profiles from AWS Identity Center Integration#64590tele-lion wants to merge 2 commits intobranch/v18from
tsh aws-profile to Generate AWS Profiles from AWS Identity Center Integration#64590Conversation
…Center Integration (#63032)
* created two AWS IC constants for account and sso region * fix inconsistency
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa51b0cb30
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| // Prepare AWS profile for the combination of each permission set and account. | ||
| for _, ps := range awsIC.PermissionSets { | ||
| profileName := formatAWSProfileName(accountName, ps.Name) |
There was a problem hiding this comment.
Make generated AWS profile names globally unique
The profile name is derived only from accountName and permission set (formatAWSProfileName(accountName, ps.Name)), so two Identity Center accounts from different sessions/integrations that share the same account label and role (for example, both have dev + Admin) produce the same [profile ...] section name. WriteSSOConfig then reuses that section and the later app silently overwrites sso_session/sso_account_id, leaving only one working profile and potentially pointing users at the wrong account.
Useful? React with 👍 / 👎.
tsh aws-profile to Generate AWS Profiles from AWS Identity Center Integration
Backport of the following PRs to branch/v18:
tsh aws-profileto Generate AWS Profiles from AWS Identity Center Integration #63032Manual Test Plan
Test Environment
Test Cases
changelog: Added a new tsh aws-profile command that detects your AWS Identity Center integration (if configured) and writes corresponding AWS profiles into your local AWS config file for later use