unbounce / iidy

iidy (Is it done yet?) -- CloudFormation with Confidence
MIT License
52 stars 7 forks source link

include AWS_DEFAULT_REGION in region fallback check #182

Closed tavisrudd closed 5 years ago

tavisrudd commented 5 years ago

It is almost certainly absent, in which case the behaviour is the same as it was prior to this commit. This commit only affects the situation where it is present and the preceding sources are not.

On Fri, May 10, 2019 at 4:26 PM tuff notifications@github.com wrote:

@tuff commented on this pull request.

In src/getCurrentAWSRegion.ts https://github.com/unbounce/iidy/pull/182#discussion_r283068262:

@@ -5,7 +5,9 @@ import {AWSRegion} from './aws-regions'; function getCurrentAWSRegion(): AWSRegion { // MUST be called after configureAWS() // this cast is only safe after that

  • const region = (aws.config.region || process.env.AWS_REGION) as AWSRegion; // tslint:disable-line
  • const region = (aws.config.region ||
  • process.env.AWS_REGION ||
  • process.env.AWS_DEFAULT_REGION) as AWSRegion; // tslint:disable-line

Can AWS_DEFAULT_REGION be absent? Should there be a check and throw if it fails?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/unbounce/iidy/pull/182#pullrequestreview-236345873, or mute the thread https://github.com/notifications/unsubscribe-auth/AABZ2VSV76RHUN6M55ZH22DPUYADTANCNFSM4HMGV6PA .