Task 2 - Run Terraform
Launch resources using Terraform
All the components required for Lab are deployed through terraform.
Perform the following steps in your Cloudshell console to create your environment.
- Clone the Github repo
git clone https://github.com/FortinetCloudCSE/api-and-websvc-fundamentals.git
- Change directory to the
cd api-and-websvc-fundamentals/terraform
folder - Run
terraform init
git clone https://github.com/FortinetCloudCSE/api-and-websvc-fundamentals.git
cd api-and-websvc-fundamentals/terraform
terraform init
Run the following command to apply it
terraform apply -var="username=$(whoami)" --auto-approve
IF THE COMMAND ABOVE RESULTS IN AN ERRORYou can manually specify your username (found in your Azure Account email) in the command
If your Workshop Azure account login is web31@ftntxxxxx.onmicrosoft.com, your username is web31, and the command to enter is:terraform apply -var='username=web31' --auto-approve
- Terraform deployment takes atleast 10-15 min to complete.
- Once Terraform is complete you should see the output. Please copy the output to notepad.
To print the node VM’s login password, you can run this command
terraform output -raw password