Skip to content

Commit

Permalink
update aws lib
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbtek committed May 4, 2020
1 parent 17c5846 commit 2e124de
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-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'
echo 'af-south-1 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-south-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-east-1' ]]
if [[ "${region}" = 'af-south-1' ]]
then
echo 'afs1'
elif [[ "${region}" = 'ap-east-1' ]]
then
echo 'ape1'
elif [[ "${region}" = 'ap-northeast-1' ]]
Expand All @@ -387,6 +390,9 @@ function getShortRegionName()
elif [[ "${region}" = 'eu-north-1' ]]
then
echo 'eun1'
elif [[ "${region}" = 'eu-south-1' ]]
then
echo 'eus1'
elif [[ "${region}" = 'eu-west-1' ]]
then
echo 'euw1'
Expand Down Expand Up @@ -560,7 +566,10 @@ function getAWSELBAccountID()

checkValidRegion "${region}"

if [[ "${region}" = 'ap-east-1' ]]
if [[ "${region}" = 'af-south-1' ]]
then
echo '098369216593'
elif [[ "${region}" = 'ap-east-1' ]]
then
echo '754344448648'
elif [[ "${region}" = 'ap-northeast-1' ]]
Expand Down Expand Up @@ -596,6 +605,9 @@ function getAWSELBAccountID()
elif [[ "${region}" = 'eu-north-1' ]]
then
echo '897822967062'
elif [[ "${region}" = 'eu-south-1' ]]
then
echo '635631232127'
elif [[ "${region}" = 'eu-west-1' ]]
then
echo '156460612806'
Expand Down

0 comments on commit 2e124de

Please sign in to comment.