From 8c367f9306190aece0a930296eefd5fc6c18b6b4 Mon Sep 17 00:00:00 2001 From: Jeffrey Cline Date: Tue, 27 Feb 2018 15:26:38 -0800 Subject: [PATCH] Fix var name --- solution_template/vm-linux-terraform/README.md | 2 +- .../vm-linux-terraform/scripts/install.sh | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/solution_template/vm-linux-terraform/README.md b/solution_template/vm-linux-terraform/README.md index d1100d55..9f6b9c77 100644 --- a/solution_template/vm-linux-terraform/README.md +++ b/solution_template/vm-linux-terraform/README.md @@ -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`. ```bash -sh ~/tfEnv.sh +source ~/tfEnv.sh ``` diff --git a/solution_template/vm-linux-terraform/scripts/install.sh b/solution_template/vm-linux-terraform/scripts/install.sh index 845c39f6..5fb980a0 100644 --- a/solution_template/vm-linux-terraform/scripts/install.sh +++ b/solution_template/vm-linux-terraform/scripts/install.sh @@ -109,15 +109,10 @@ chmod 666 $REMOTESTATEFILE 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 -echo "echo export ARM_SUBSCRIPTION_ID=\"$SUBSCRIPTION_ID\" >>$PROFILEFILE" >> $TFENVFILE -echo "echo export ARM_CLIENT_ID=\"$MSI_PRINCIPAL_ID\" >>$PROFILEFILE" >> $TFENVFILE -echo "echo export USE_MSI=true >>$PROFILEFILE" >> $TFENVFILE +echo "export ARM_SUBSCRIPTION_ID=\"$SUBSCRIPTION_ID\"" >> $PROFILEFILE +echo "export ARM_CLIENT_ID=\"$MSI_PRINCIPAL_ID\"" >> $PROFILEFILE +echo "export ARM_USE_MSI=true" >> $PROFILEFILE # Add contributor permissions to the MSI for entire subscription echo "az login" >> $TFENVFILE