Skip to main content
Providers

BlobContainer

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

import BlobContainer from "azure/storage"

Example

resource BlobContainer example {
    name                           = "example-value"
    storageAccountName             = "example-value"
    resourceGroup                  = "example-value"
    publicAccess                   = "None"
    metadata                       = "..."
    immutableStorageWithVersioning = true
    defaultEncryptionScope         = "example-value"
    denyEncryptionScopeOverride    = true
}

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 blob container. Must be 3-63 characters, lowercase letters, numbers, and hyphens
storageAccountNamestring—NoThe name of the storage account
resourceGroupstring—NoThe resource group name
publicAccessstring"None"NoThe level of public access to the container. None: No public access, Blob: Public read access for blobs only, Container: Public read access for container and blobs Allowed: "None", "Blob", "Container"
metadataobject—NoContainer metadata as key-value pairs
immutableStorageWithVersioningboolean—NoEnable immutable storage with versioning. Once enabled, cannot be disabled
defaultEncryptionScopestring—NoDefault encryption scope for the container
denyEncryptionScopeOverrideboolean—NoDeny encryption scope override. When true, blobs must use the container's default encryption scope

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 container
etagstringNoThe ETag of the container
lastModifiedTimestringNoThe last modified time
leaseStatusstringNoThe lease status
leaseStatestringNoThe lease state
hasImmutabilityPolicybooleanNoWhether the container has immutability policy
hasLegalHoldbooleanNoWhether the container has legal hold

On this page