Skip to content

Commit

Permalink
add more regions
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbtek committed Oct 2, 2019
1 parent 7194624 commit 4ef9179
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions libraries/aws.bash
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ function checkValidRegion()

function getAllowedRegions()
{
echo 'ap-northeast-1 ap-northeast-2 ap-south-1 ap-southeast-1 ap-southeast-2 ca-central-1 eu-central-1 eu-north-1 eu-west-1 eu-west-2 eu-west-3 sa-east-1 us-east-1 us-east-2 us-west-1 us-west-2'
echo 'ap-east-1 ap-northeast-1 ap-northeast-2 ap-south-1 ap-southeast-1 ap-southeast-2 ca-central-1 eu-central-1 eu-north-1 eu-west-1 eu-west-2 eu-west-3 me-south-1 sa-east-1 us-east-1 us-east-2 us-west-1 us-west-2'
}

function getRegionFromRecordSetAliasTargetDNSName()
Expand All @@ -360,7 +360,10 @@ function getShortRegionName()

checkValidRegion "${region}"

if [[ "${region}" = 'ap-northeast-1' ]]
if [[ "${region}" = 'ap-east-1' ]]
then
echo 'ape1'
elif [[ "${region}" = 'ap-northeast-1' ]]
then
echo 'apne1'
elif [[ "${region}" = 'ap-northeast-2' ]]
Expand Down Expand Up @@ -393,6 +396,9 @@ function getShortRegionName()
elif [[ "${region}" = 'eu-west-3' ]]
then
echo 'euw3'
elif [[ "${region}" = 'me-south-1' ]]
then
echo 'mes1'
elif [[ "${region}" = 'sa-east-1' ]]
then
echo 'sae1'
Expand Down Expand Up @@ -554,7 +560,10 @@ function getAWSELBAccountID()

checkValidRegion "${region}"

if [[ "${region}" = 'ap-northeast-1' ]]
if [[ "${region}" = 'ap-east-1' ]]
then
echo '754344448648'
elif [[ "${region}" = 'ap-northeast-1' ]]
then
echo '582318560864'
elif [[ "${region}" = 'ap-northeast-2' ]]
Expand Down Expand Up @@ -596,6 +605,9 @@ function getAWSELBAccountID()
elif [[ "${region}" = 'eu-west-3' ]]
then
echo '009996457667'
elif [[ "${region}" = 'me-south-1' ]]
then
echo '076674570225'
elif [[ "${region}" = 'sa-east-1' ]]
then
echo '507241528517'
Expand Down

0 comments on commit 4ef9179

Please sign in to comment.