Fix var name

This commit is contained in:
Jeffrey Cline 2018-02-27 15:26:38 -08:00
parent 1d14416523
commit 8c367f9306
2 changed files with 4 additions and 9 deletions

View File

@ -24,5 +24,5 @@ Steps to Enable MSI
Once the template has finished deployment, log into the VM via `SSH` and run the following command to enable `MSI` with `Terraform`. Once the template has finished deployment, log into the VM via `SSH` and run the following command to enable `MSI` with `Terraform`.
```bash ```bash
sh ~/tfEnv.sh source ~/tfEnv.sh
``` ```

View File

@ -109,15 +109,10 @@ chmod 666 $REMOTESTATEFILE
chown -R $USERNAME:$USERNAME /home/$USERNAME/tfTemplate chown -R $USERNAME:$USERNAME /home/$USERNAME/tfTemplate
touch $TFENVFILE
echo "export ARM_SUBSCRIPTION_ID=\"$SUBSCRIPTION_ID\"" >> $TFENVFILE
echo "export ARM_CLIENT_ID=\"$MSI_PRINCIPAL_ID\"" >> $TFENVFILE
echo "export USE_MSI=true" >> $TFENVFILE
# Set these variables in the profile # Set these variables in the profile
echo "echo export ARM_SUBSCRIPTION_ID=\"$SUBSCRIPTION_ID\" >>$PROFILEFILE" >> $TFENVFILE echo "export ARM_SUBSCRIPTION_ID=\"$SUBSCRIPTION_ID\"" >> $PROFILEFILE
echo "echo export ARM_CLIENT_ID=\"$MSI_PRINCIPAL_ID\" >>$PROFILEFILE" >> $TFENVFILE echo "export ARM_CLIENT_ID=\"$MSI_PRINCIPAL_ID\"" >> $PROFILEFILE
echo "echo export USE_MSI=true >>$PROFILEFILE" >> $TFENVFILE echo "export ARM_USE_MSI=true" >> $PROFILEFILE
# Add contributor permissions to the MSI for entire subscription # Add contributor permissions to the MSI for entire subscription
echo "az login" >> $TFENVFILE echo "az login" >> $TFENVFILE