- Lab
- A Cloud Guru
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.
Path Info
Table of Contents
-
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.- Log into the Azure CLI using the provided credentials.
- Retrieve the provided resource group name.
- 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
. - Add a new
azurerm_storage_account
with the following settings:- Account tier: Standard
- Account replication: LRS
- Blob last access time tracking: Enabled
- Add a new
azapi_update_resource
to disable the local user for the storage account. - 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
- Apply the configuration to deploy the resources.
-
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.- Update the Terraform configuration to use the AzureRM provider version
3.98.0
. - Update the
azurerm_storage_account
resource to disable the local user. - Create a new
azurerm_storage_account_management_policy
resource to replace theazapi_resource
for the storage account management policy. - Apply the configuration to update the resources.
- Update the Terraform configuration to use the AzureRM provider version
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.