Skip to content

Commit

Permalink
fix the rest of s3 bucket names
Browse files Browse the repository at this point in the history
  • Loading branch information
nour-sb committed Jun 27, 2024
1 parent 376d501 commit e1bcb5b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/destroy
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ terraform destroy -input=false -auto-approve > /dev/null

echo "Deleting the S3 bucket"
export AWS_DEFAULT_REGION=ap-southeast-1
aws s3 rm s3://wireguard-vpn --recursive
aws s3 rb s3://wireguard-vpn
aws s3 rm s3://wireguard --recursive
aws s3 rb s3://wireguard
popd
6 changes: 3 additions & 3 deletions scripts/provision
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ set -e
pushd terraform


if ! aws s3 ls s3://wireguard-vpn > /dev/null 2>&1; then
if ! aws s3 ls s3://wireguard > /dev/null 2>&1; then
echo "Creating S3 bucket for terraform"
aws s3 mb s3://wireguard-vpn
aws s3api put-object --bucket wireguard-vpn --key terraform
aws s3 mb s3://wireguard
aws s3api put-object --bucket wireguard --key terraform
else
echo "S3 bucket already exists, skipping creation";
fi
Expand Down

0 comments on commit e1bcb5b

Please sign in to comment.