Skip to content

Commit

Permalink
Merge pull request #22 from zalando/bugfix/s3_explicit_region
Browse files Browse the repository at this point in the history
Set S3 region in Spilo explicitly.
  • Loading branch information
CyberDem0n committed Sep 10, 2015
2 parents f7c99ec + aeeb95d commit 551c3b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions postgres-appliance/postgres_ha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,11 @@ __EOF__

function write_archive_command_environment
{
# get current AWS region
region=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone|head -c -1)
mkdir -p ${WALE_ENV_DIR}
echo "s3://${WAL_S3_BUCKET}/spilo/${SCOPE}/wal/" > ${WALE_ENV_DIR}/WALE_S3_PREFIX
echo "https+path://s3-$region.amazonaws.com:443" > ${WALE_ENV_DIR}/WALE_S3_ENDPOINT
}

write_postgres_yaml
Expand Down

0 comments on commit 551c3b5

Please sign in to comment.