Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 24 lines (17 sloc) 510 Bytes
#!/usr/bin/env bash
cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)/../.." # Start from a consistent working directory
if [[ -f "service/.bastion-ip" ]]
then
echo "Fetching bastion service endpoint..."
invoke_url=$(terraform output bastion_service_endpoint)
if [[ -z ${invoke_url} ]]
then
echo "No bastion service found." >&2
exit 1
fi
cd service
echo "Destroying bastion..."
INVOKE_URL=${invoke_url} bundle exec ruby destroy.rb
rm .bastion-ip
fi
echo "Done"