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

Make aws-region optional #689

Closed
wants to merge 2 commits into from

Conversation

niceFont
Copy link

@niceFont niceFont commented Mar 8, 2023

Issue #, if available:


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -287,7 +287,7 @@ async function run() {
const accessKeyId = core.getInput('aws-access-key-id', { required: false });
const audience = core.getInput('audience', { required: false });
const secretAccessKey = core.getInput('aws-secret-access-key', { required: false });
const region = core.getInput('aws-region', { required: true });
const region = core.getInput('aws-region', { required: true }) || process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION;
Copy link
Contributor

Choose a reason for hiding this comment

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

Set required: false 🙂

expect(core.exportVariable).toHaveBeenCalledWith("AWS_REGION", "fake-default-region")
expect(core.exportVariable).toHaveBeenCalledWith("AWS_DEFAULT_REGION", "fake-default-region")
})

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like two more tests here:

One to make sure that when the action input, and both AWS_REGION and AWS_DEFAULT_REGION are all set, the action will prefer the action input value over all others.

Another test to verify that when both AWS_REGION and AWS_DEFAULT_REGION are set, it prefers AWS_REGION

@peterwoodworth
Copy link
Contributor

I'm going to be closing this - we want to think about how to best accomplish this while considering the option to use global endpoints. We're working on the next version which will be using js v3, meaning the implementation of this feature would look different there, and we'll be including the option to use global endpoints.

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.

Supplying region should be optional
2 participants