CloudWiki
Resource

Blob Storage

Microsoft Azure
Storage
Azure Blob Storage is a cloud-based object storage solution that allows users to store and retrieve large amounts of unstructured data such as text, images, videos, and other files in a highly scalable and available manner. It is designed for applications that require massive amounts of data storage and is used by a wide range of industries including healthcare, finance, media, and entertainment. Azure Blob Storage offers three storage tiers: hot, cool, and archive, each with different performance characteristics and pricing. The hot tier is designed for frequently accessed data, while the cool and archive tiers are intended for infrequently accessed or long-term storage, respectively. Azure Blob Storage provides a REST API and client libraries for several programming languages, including .NET, Java, Python, and Node.js, making it easy to interact with the service programmatically. It also integrates with other Azure services such as Azure Data Factory, Azure Functions, and Azure Stream Analytics, and provides advanced security and compliance features such as encryption, access control, and auditing.‍
Terraform Name
terraform
azurerm_storage_blob
Blob Storage
attributes:

The following arguments are supported:

  • name - (Required) The name of the storage blob. Must be unique within the storage container the blob is located. Changing this forces a new resource to be created.
  • storage_account_name - (Required) Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created. Changing this forces a new resource to be created.
  • storage_container_name - (Required) The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
  • type - (Required) The type of the storage blob to be created. Possible values are Append, Block or Page. Changing this forces a new resource to be created.
  • size - (Optional) Used only for page blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to 0. Changing this forces a new resource to be created.

Note:

size is required if source_uri is not set.

  • access_tier - (Optional) The access tier of the storage blob. Possible values are Archive, Cool and Hot.
  • cache_control - (Optional) Controls the cache control header content of the response when blob is requested .
  • content_type - (Optional) The content type of the storage blob. Cannot be defined if source_uri is defined. Defaults to application/octet-stream.
  • content_md5 - (Optional) The MD5 sum of the blob contents. Cannot be defined if source_uri is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.

NOTE:

This property is intended to be used with the Terraform internal filemd5 and md5 functions when source or source_content, respectively, are defined.

  • source - (Optional) An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if source_content or source_uri is specified. Changing this forces a new resource to be created.
  • source_content - (Optional) The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if source or source_uri is specified. Changing this forces a new resource to be created.
  • source_uri - (Optional) The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if source or source_content is specified.
  • parallelism - (Optional) The number of workers per CPU core to run for concurrent uploads. Defaults to 8. Changing this forces a new resource to be created.

NOTE:

parallelism is only applicable for Page blobs - support for Block Blobs is blocked on the upstream issue.

  • metadata - (Optional) A map of custom blob metadata.

Associating resources with a
Blob Storage
Resources do not "belong" to a
Blob Storage
Rather, one or more Security Groups are associated to a resource.
Create
Blob Storage
via Terraform:
The following HCL manages a Blob within a Storage Container
Syntax:

resource "azurerm_resource_group" "example" {
 name     = "example-resources"
 location = "West Europe"
}

resource "azurerm_storage_account" "example" {
 name                     = "examplestoracc"
 resource_group_name      = azurerm_resource_group.example.name
 location                 = azurerm_resource_group.example.location
 account_tier             = "Standard"
 account_replication_type = "LRS"
}

resource "azurerm_storage_container" "example" {
 name                  = "content"
 storage_account_name  = azurerm_storage_account.example.name
 container_access_type = "private"
}

resource "azurerm_storage_blob" "example" {
 name                   = "my-awesome-content.zip"
 storage_account_name   = azurerm_storage_account.example.name
 storage_container_name = azurerm_storage_container.example.name
 type                   = "Block"
 source                 = "some-local-file.zip"
}

Create
Blob Storage
via CLI:
Parametres:

az storage blob directory create --container-name
                                --directory-path
                                [--account-key]
                                [--account-name]
                                [--auth-mode {key, login}]
                                [--connection-string]
                                [--lease-id]
                                [--metadata]
                                [--permissions]
                                [--sas-token]
                                [--timeout]
                                [--umask]

Example:

az storage blob directory create -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount

aws cost
Costs
Direct Cost
Indirect Cost
No items found.
Best Practices for
Blob Storage

Categorized by Availability, Security & Compliance and Cost

Low
Access allowed from VPN
No items found.
Low
Auto Scaling Group not in use
No items found.
Medium
Connections towards DynamoDB should be via VPC endpoints
No items found.
Medium
Container in CrashLoopBackOff state
No items found.
Low
EC2 with GPU capabilities
No items found.
Medium
EC2 with high privileged policies
No items found.
Medium
ECS cluster delete alarm
No items found.
Critical
ECS task with Admin access (*:*)
Medium
ECS task with high privileged policies
No items found.
Critical
EKS cluster delete alarm
No items found.
Medium
ElastiCache cluster delete alarm
No items found.
Medium
Ensure Container liveness probe is configured
No items found.
Medium
Ensure ECS task definition has memory limit
No items found.
Critical
Ensure EMR cluster master nodes are not publicly accessible
No items found.
More from
Microsoft Azure