terraform version
curl -O https://releases.hashicorp.com/terraform/1.4.6/terraform_1.4.6_linux_amd64.zip
unzip terraform_1.4.6_linux_amd64.zip
mkdir bin
mv terraform bin/
terraform version
george [ ~ ]$ nano blobstorageterraform.tf
Important : Using Ctrl + ^ + X, press Y or enter (Yes) to save the changes.
terraform{
required_providers {
azurerm = {
source = "hashicorp/azurerm"
}
}
}
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "{resource group}" {
name="{resource group}"
location = "westeurope"
}
resource "azurerm_storage_account" "{storage account}" {
name = "{storage account}"
resource_group_name = azurerm_resource_group.{resource group}.name
location = azurerm_resource_group.{resource group}.location
account_tier = "Standard"
account_replication_type = "LRS"
}
resource "azurerm_storage_container" "images" {
name = "images"
storage_account_name = azurerm_storage_account.{storage account}.name
container_access_type = "private"
}
terraform init
terraform plan -out {name}.tfplan
terraform apply "{name}.tfplan"
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)