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

Using Terraform with Azure (Setting the Stage)

Welcome to the Using Terraform with Azure lab. In this lab, we will cover three objectives: 1. Log into Azure 1. Create the Terraform Configuration 1. Deploy the Configuration By the end of the lab, you'll have deployed a container group to Microsoft Azure using Terraform.

Azure icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 15m
Published
Clock icon May 02, 2024

Contact sales

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

Table of Contents

  1. Challenge

    Log into Azure

    In this objective, you'll use the credentials provided by the lab to log into Azure using the Azure CLI.

    1. Open your terminal and run the az login command
    2. In the browser window that opens, enter the credentials provided by the lab
    3. Run az account show to verify you've logged in successfully
  2. Challenge

    Create the Terraform Configuration

    In this objective, you'll create a Terraform configuration that deploys a container group to Azure.

    1. Create new directory and files to hold your Terraform configuration.
    2. Add a terraform block requiring major version 3 of the azurerm provider.
    3. Add an azurerm provider block with the skip_provider_registration argument set to true.
    4. Add a data source to reference the existing resource group.
    5. Add a container group resource that uses the ACI hello world image and exposes port 80 on a public URL.
      • Image reference: mcr.microsoft.com/azuredocs/aci-helloworld
    6. Add an output to display the FQDN of the container group.
    7. Initialize your working directory.
    8. Format and validate the code.
  3. Challenge

    Deploy the Configuration

    In this objective, you'll deploy the Terraform configuration to Azure and verify the deployment.

    1. Create a terraform.tfvars file and populate any required variables.
    2. Deploy the configuration to Azure.
    3. Visit the address shown in the output and verify the webpage loads.

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