Hands-on Challenge Day - Terraform on Azure: Blob Storage Setup
Infrastructure as Code (IaC) is a key DevOps practice, enabling developers and IT professionals to automate the provisioning and management of infrastructure. Terraform, by HashiCorp, is an open-source tool that allows you to define both cloud and on-premises resources in human-readable configuration files that can be versioned, reused, and shared.
Azure Blob Storage is Microsoft Azure's object storage solution for the cloud. It is optimized for storing massive amounts of unstructured data, such as text or binary data, which makes it ideal for serving images or documents directly to a browser, storing files for distributed access, streaming video and audio, and storing backup and restore, disaster recovery, and archiving data.
"GlobalMedia Inc." is an international news organization with terabytes of multimedia content. They need a scalable, secure, and cost-effective storage solution to archive their vast media library. They've decided to utilize Azure Blob Storage for its scalability and robustness and have chosen Terraform to automate the provisioning and management of their cloud infrastructure.
Problem Statement: GlobalMedia Inc. requires an automated way to provision and configure Azure Blob Storage to store, manage, and access its multimedia content efficiently.
Your Mission: Utilize Terraform to automate the creation and configuration of Azure Blob Storage for GlobalMedia Inc., ensuring it meets their scalability, security, and accessibility needs.
Set Up Terraform Provider for Azure:
provider "azurerm" {
features {}
}
Define the Azure Resource Group:
resource "azurerm_resource_group" "globalmedia" {
name = "GlobalMediaResources"
location = "East US"
}
Configure Azure Storage Account:
resource "azurerm_storage_account" "globalmediastorage" {
name = "globalmediastorage"
resource_group_name = azurerm_resource_group.globalmedia.name
location = azurerm_resource_group.globalmedia.location
account_tier = "Standard"
account_replication_type = "GRS"
tags = {
environment = "Archive"
}
}
Set Up a Blob Container:
resource "azurerm_storage_container" "media_container" {
name = "mediacontent"
storage_account_name = azurerm_storage_account.globalmediastorage.name
container_access_type = "blob"
}