Skip to content
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

feature: Support multi region login for AWS ECR #857

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hhrygim
Copy link

@hhrygim hhrygim commented Feb 28, 2025

This adds support for allowing AWS ECR logins via multiple regions.

Functionality is quite similar to the existing support for multi-AWS accounts. This adds in a new valid environment variable AWS_REGIONS that can additionally be used to run the login against multiple regions.

Main changes are in aws.ts where getRegion is replaced by getRegions which will construct and return a list rather than a string. Since getRegistriesData already returns regDatas in a list due to its support for multi-aws-accounts, all I really needed to add was a for-loop wrapper to iterate on regions around the existing loop that iterates on account IDs.

This adds support for allowing AWS ECR logins via multiple regions.

Functionality is quite similar to the existing support for multi-AWS
accounts. This adds in a new valid environment variable `AWS_REGIONS`
that can additionally be used to run the login against multiple regions.

Main changes are in `aws.ts` where `getRegion` is replaced by
`getRegions` which will construct and return a list rather than a
string. Since `getRegistriesData` already returns `regDatas` in a list
due to its support for multi-aws-accounts, all I really needed to add
was a `for-loop` wrapper to iterate on regions around the existing loop
that iterates on account IDs.

Signed-off-by: Helen Lim <hlim2@atlassian.com>
@hhrygim hhrygim force-pushed the support-multi-region branch from 07451cc to a98cecd Compare February 28, 2025 16:42
@hhrygim hhrygim changed the title feature: Support multi reagion login for AWS ECR feature: Support multi region login for AWS ECR Feb 28, 2025
@hhrygim
Copy link
Author

hhrygim commented Mar 3, 2025

@crazy-max Wondering if you have any thoughts on this PR and if we think this is a useful feature to add. Not sure if I should open up an issue as well - lmk

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.

1 participant