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 Resources with the AzAPI Provider

Welcome to the Deploy Resources with the AzAPI lab. In this lab, we will cover two objectives: 1. Deploy a Configuration Using the AzAPI Provider 1. Update Resources to Use the AzureRM Provider By the end of this lab, you will have successfully deployed a configuration using the AzAPI provider, and then updated existing resources to use the AzureRM provider.

Azure icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 30m
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

    Deploy a Configuration Using the AzAPI Provider

    In this objective, you will deploy a configuration using the AzAPI and AzureRM providers. The version of the AzureRM provider approved by Globomantics is 3.70.0. This version does not support these two features:

    • Disabling the local user for a storage account
    • Using the cold storage tier for a storage account management policy

    You will use the azapi provider to support these features until the approved AzureRM provider is updated.

    1. Log into the Azure CLI using the provided credentials.
    2. Retrieve the provided resource group name.
    3. Create a new Terraform configuration with the resource group as a data source and the required version of the AzureRM provider set to 3.70.0.
    4. Add a new azurerm_storage_account with the following settings:
      • Account tier: Standard
      • Account replication: LRS
      • Blob last access time tracking: Enabled
    5. Add a new azapi_update_resource to disable the local user for the storage account.
    6. Add a new azapi_resource to create a storage account management policy with the following settings:
      • Filter on blob types: BlockBlob
      • Transition to cool tier after last access: 90 days
      • Transition to cold tier after last access: 365 days
    7. Apply the configuration to deploy the resources.
  2. Challenge

    Update Resources to Use the AzureRM Provider

    In this objective, you will update the resources created in the previous objective to use the AzureRM provider. Globomantics has now approved version 3.98.0 of the AzureRM provider, which supports the features required for the storage account. Update the configuration without destroying the existing storage account.

    1. Update the Terraform configuration to use the AzureRM provider version 3.98.0.
    2. Update the azurerm_storage_account resource to disable the local user.
    3. Create a new azurerm_storage_account_management_policy resource to replace the azapi_resource for the storage account management policy.
    4. Apply the configuration to update the resources.

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