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

Deploy to Azure Using the Terraform Command Line Interface (CLI)

In this hands-on lab, you will author a Terraform configuration for Azure and apply the configuration using the Terraform Command Line Interface (CLI). > **Important Note**: Version 4.x of the AzureRM provider for Terraform introduces breaking changes, you must **use version 3.116.0** or lower to follow the guide and/or videos provided with this lab. Please refer to the lab guide for more details.

Azure icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 30m
Published
Clock icon Mar 24, 2023

Contact sales

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

Table of Contents

  1. Challenge

    Log In to Azure

    1. Connect to the virtual machine using the credentials provided.
    2. Using the terminal in Visual Studio Code, log in to Azure using the Azure CLI.
  2. Challenge

    Author Your Terraform Configuration

    1. Create a folder for your configuration.
    2. Create a main.tffile in the folder.
    3. Author your configuration, including the terraform block and required providers meta-argument.
    4. Use azurerm provider version 3.116.0 or lower.

    Note: Version 4.x of the AzureRM provider for Terraform introduces breaking changes, you must use version 3.116.0 or lower to follow the guide and/or videos provided with this lab.

  3. Challenge

    Initialize the Working Directory

    Use the Terraform executable to initialize the working directory.

  4. Challenge

    Declare Your Provider Configuration

    1. Add the provider configuration block to your Terraform configuration file.
    2. The skip_provider_registration = true must be set.
  5. Challenge

    Import the Existing Resource Group

    Import the existing resource group into your Terraform state.

  6. Challenge

    Declare a Storage Account Resource

    Create an Azure Storage Account resource block, using the following properties:

    ```
    account_tier = "Standard"
    account_replication_type = "LRS"
    ```
    
  7. Challenge

    Format and Validate the Configuration

    Use the Terraform executable to format and validate the configuration.

  8. Challenge

    Plan and Deploy Your Configuration

    Use the Terraform executable to plan and apply your configuration.

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