Skip to main content
Providers

StorageAccount

A resource of the Azure provider, version 0.3.0, in its Storage group. Import it with:

import StorageAccount from "azure/storage"

Example

resource StorageAccount example {
    name                            = "example-value"
    resourceGroup                   = "example-value"
    location                        = "example-value"
    sku                             = "Standard_LRS"
    kind                            = "StorageV2"
    accessTier                      = "Hot"
    enableHttpsTrafficOnly          = true
    minimumTlsVersion               = "TLS1_2"
    allowBlobPublicAccess           = false
    allowSharedKeyAccess            = true
    enableHierarchicalNamespace     = false
    infrastructureEncryptionEnabled = false
    largeFileSharesEnabled          = false
    networkRules                    = "..."
    tags                            = "..."
}

Properties

Set by your code in the resource block. A required one must be set; any other you leave out takes the value under Default, if it has one.

NameTypeDefaultRequiredDescription
namestring—NoThe name of the storage account (3-24 chars, lowercase letters and numbers, globally unique)
resourceGroupstring—NoThe resource group name
locationstring—NoThe Azure region for the storage account
skustring"Standard_LRS"NoThe SKU (pricing tier and replication) Allowed: "Standard_LRS", "Standard_GRS", "Standard_RAGRS", "Standard_ZRS", "Premium_LRS", "Premium_ZRS"
kindstring"StorageV2"NoThe kind of storage account Allowed: "Storage", "StorageV2", "BlobStorage", "BlockBlobStorage", "FileStorage"
accessTierstring"Hot"NoThe access tier for blob storage Allowed: "Hot", "Cool"
enableHttpsTrafficOnlybooleantrueNoEnable HTTPS traffic only
minimumTlsVersionstring"TLS1_2"NoMinimum TLS version Allowed: "TLS1_0", "TLS1_1", "TLS1_2"
allowBlobPublicAccessbooleanfalseNoAllow blob public access
allowSharedKeyAccessbooleantrueNoAllow shared key access
enableHierarchicalNamespacebooleanfalseNoEnable hierarchical namespace (Data Lake Storage Gen2)
infrastructureEncryptionEnabledbooleanfalseNoEnable infrastructure encryption
largeFileSharesEnabledbooleanfalseNoEnable large file shares (100 TiB capacity)
networkRulesany—NoNetwork rules for firewall configuration
tagsobject—NoTags to apply to the storage account

Set by Azure after the resource is created: your code can read them but not set them. An importable one identifies an existing resource.

NameTypeImportableDescription
idstringYesThe resource ID of the storage account
primaryBlobEndpointstringNoThe primary blob endpoint
primaryFileEndpointstringNoThe primary file endpoint
primaryQueueEndpointstringNoThe primary queue endpoint
primaryTableEndpointstringNoThe primary table endpoint
primaryAccessKeystringNoThe primary access key
primaryConnectionStringstringNoThe primary connection string
provisioningStatestringNoThe provisioning state

On this page