Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Azure icon
Labs

Make Changes to Azure Infrastructure Using Terraform

Hey there, Gurus! Welcome to the lab! This lab will demonstrate how easy it is to manage and destroy infrastructure in Azure with Terraform. You, as an admin, are being asked to deploy a virtual network to Azure and then make some changes to the Azure infrastructure that has been deployed. You will then add a subnet to your test infrastructure and tags to the virtual network that specify the environment and team responsible for resource deployment. After testing the deployment, you will need to destroy all of the resources for the test infrastructure.

Azure icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 45m
Published
Clock icon Aug 27, 2021

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Log In and Set Up the CLI

    In the Portal

    1. Go to the portal and log in using your lab credentials.
    2. Open the CLI.
    3. Select Bash at the prompt.
    4. Click Show Advanced Settings.
    5. Set the Cloud Shell region to the same location as the resource group.
    6. Select the existing Resource Group, and select Use Existing for the Storage Account.
    7. In the File share section, choose Create new and enter "terraform".
    8. Click Attach Storage.
  2. Challenge

    Deploy the Infrastructure

    In the CLI

    1. Download the lab-managing-azure.zip file from the lab's GitHub repo.
    2. Unzip the lab-managing-azure.zip file.
    3. Change to the lab-managing-azure working directory.
    4. Review the Terraform configuration file.
    5. Add the lab's Subscription ID and Azure Resource Group name to the configuration.
    6. Initialize the working directory.
    7. Apply the Terraform configuration.
  3. Challenge

    Add a Subnet to the Configuration

    In the CLI

    1. Download the azure_resource_blocks.tf file from the lab's GitHub repo.
    2. Review the azure_resource_blocks.tf configuration file.
    3. Add the lab's Azure Resource Group name to the configuration.
    4. Apply the changes to your infrastructure.
    5. Confirm your changes.
  4. Challenge

    Add a Tag to the Configuration

    In the CLI

    1. Edit the main.tf configuration file.
    2. Add the following code to the Virtual Network resource block:
      # Create Tag
        tags = {
          Environment = "TheBatcave"
          Team        = "Batman"
        }
      
    3. Check the formatting.
    4. Apply the changes to your infrastructure.
    5. Confirm your changes.
  5. Challenge

    Destroy the Infrastructure

    In the CLI

    1. Delete your infrastructure using Terraform.
    2. Confirm your changes.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans