Added Tenent ID env var

This commit is contained in:
Jeffrey Cline
2018-02-28 15:01:25 -08:00
parent 01e04057a5
commit bd113c744f
2 changed files with 6 additions and 1 deletions

View File

@ -58,6 +58,9 @@ while getopts :s:a:k:l:u:d: optname; do
s) #azure subscription id
SUBSCRIPTION_ID=${OPTARG}
;;
t) #azure tenant id
TENANT_ID=${OPTARG}
;;
a) #storage account name
STORAGE_ACCOUNT_NAME=${OPTARG}
;;
@ -114,6 +117,7 @@ echo "export ARM_SUBSCRIPTION_ID=\"$SUBSCRIPTION_ID\"" >> $PROFILEFILE
echo "export ARM_CLIENT_ID=\"$MSI_PRINCIPAL_ID\"" >> $PROFILEFILE
echo "export ARM_USE_MSI=true" >> $PROFILEFILE
echo "export ARM_MSI_ENDPOINT=\"https://localhost:50342\"" >> $PROFILEFILE
echo "export ARM_TENANT_ID=\"$TENANT_ID\"" >> $PROFILEFILE
# Add contributor permissions to the MSI for entire subscription
touch $TFENVFILE