Skip to content

Commit

Permalink
FAZ: tf deploy script update
Browse files Browse the repository at this point in the history
  • Loading branch information
jvhoof committed Nov 12, 2024
1 parent 7d9105e commit 385fe57
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions FortiAnalyzer/Terraform/single/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,26 @@ else
fi
password="$passwd"

if [ -z "$DEPLOY_SUBSCRIPTION_ID" ]
then
detected_id=`az account show | jq ".id" -r`
# Input username
echo -n "Enter subscription ID (press enter for detected id: '$detected_id'): "
stty_orig=`stty -g` # save original terminal setting.
read subscription_id # read the subscription id
stty $stty_orig # restore terminal setting.
if [ -z "$subscription_id" ]
then
subscription_id="$detected_id"
fi
else
subscription_id="$DEPLOY_SUBSCRIPTION_ID"
fi
export TF_VAR_subscription_id="$subscription_id"
echo ""
echo "--> Using subscription id '$subscription_id' ..."
echo ""

SUMMARY="summary.out"

echo ""
Expand Down

0 comments on commit 385fe57

Please sign in to comment.