Task 2: Run Terraform

GoalRun Terraform
TaskClone the repo and run the terraform commands
Verify task completionYou should be able to see the output of 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.

  1. Clone the GitHub repo git clone https://github.com/FortinetCloudCSE/fortiweb-security-foundations-201.git
  2. Change directory to the cd fortiweb-security-foundations-201/terraform folder
  3. Run terraform init
git clone https://github.com/FortinetCloudCSE/fortiweb-security-foundations-201.git
cd fortiweb-security-foundations-201/terraform
terraform init

lab11 lab11

  1. Run the following command to apply it

    terraform apply -var="username=$(whoami)" --auto-approve
    IF THE COMMAND ABOVE RESULTS IN AN ERROR

    You 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

lab12 lab12

  1. Terraform deployment takes at least 10-15 min to complete.
  • Once Terraform is complete you should see the output. Please copy the output to notepad.

lab13 lab13

  1. To print the node VM’s login password, you can run this command

    terraform output -raw password

lab14 lab14