Skip to content

Commit

Permalink
Updating deploy.sh. removing path
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentLesle committed May 11, 2019
1 parent 2cf8efc commit d521e1e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

# capture the current path
current_path=$(pwd)
path=$1
tf_command=$2
tf_command=$1


function initialize_state {
Expand Down Expand Up @@ -46,20 +45,20 @@ function deploy_blueprint {


# Initialise storage account to store remote terraform state
if [[ -z "${path}" && -z "$2" ]]; then
if [[ -z "${tf_command}" ]]; then
initialize_state
fi

if [[ -n "${path}" && -n "${tf_command}" ]]; then
if [[ -n "${tf_command}" ]]; then
echo ''
echo "Deploying blueprint '${path}' with terraform command '${tf_command}'"
echo "Deploying blueprint with terraform command '${tf_command}'"
echo ''
deploy_blueprint
else
echo ''
echo 'You have to run at least once ./deploy.sh with no parameters to setup the remote state.'
echo 'To deploy a bluepring you have to specify the sub-folder name and the terraform command [plan|apply|destroy]'
echo './deploy.sh step1-aks plan'
echo 'To deploy a bluepring you have to run the terraform command [plan|apply|destroy]'
echo './deploy.sh plan'
echo ''
echo 'Note: the script does the terraform init for you.'
fi

0 comments on commit d521e1e

Please sign in to comment.