Storage Account

Overview

{
	"storage_account": {
		"name": "ststorage{env}",
		"kind": "StorageV2",
		"sku": "Standard_LRS",

		"@log_analytics_workspace_name": "log-workspace-{env}",
		"containers": [
			{
				"name": "cistdev",
				"public_access": "Container",
			}
		],
		"tier": "Cool",
		"https_only": true,
		"keyvault": {
			"@key_vault_name": "kv-vault-{env}",
			"secrets": { "connection_string": "defaultappkey" }
		},
		"cors": {
            "max_age": 200,
            "methods": [
                "GET",
                "POST",
                "PUT"
            ],
            "services": [
                "Blob",
                "Queue"
            ],
            "origins": [
                "http://localhost:8080"
            ],
            "headers": [
                "x-ms-meta-data*"
            ],
            "exposed_headers": [
                "x-ms-meta-data*"
            ]
		},
		"location": "northeurope",
		"external": false,
		"tags": { "example": "S0" }
	}
}

Storage Account Reference

KeyTypeDescription
name (required)stringThe name of the Storage Account (see how to name)
kind (required)Storage Kind DefinitionKind of the Storage Account
sku (required)Storage Sku DefinitionRedundancy of the Storage Account
@log_analytics_workspace_namestring (reference to a log workspace)The name of the workspace that you want to attach to (external or not)
containersarray of Container DefinitionOrganizes a set of blobs, similar to a directory in a file system (defaults to no containers)
tierStorage TierThe access tier of the Storage Account, (defaults to hot)
https_onlyboolEnforces HTTPS traffic only to storage service if set to true (defaults to true)
keyvaultKeyvaultThe name of the Keyvault that this function will have Get access (defaults to no keyvault config)
locationstringResource Location (defaults to the resource group location)
externalboolA reference to an existing Storage Account (defaults to false)
tagsobjectAdditional tags for the resource (defaults to no additional tags)

StorageKind

ValueDescription
StorageOutdated Kind of Storage Account, it is recommend to use “StorageV2” instead of “Storage”
StorageV2Standard storage account type for blobs, file shares, queues, and tables.
BlobStorageBest for random read and write operations
BlockBlobStorageBest for high transaction rates or low storage latency, ideal for store text or binary files and to upload large files

StorageSku

ValueDescription
Standard_LRSStandard Locally Redundant Storage, data replication within a single region, meaning that data is stored multiple times within a single datacenter
Standard_GRSStandard Geo Replicated Storage, data replication between two regions, ensuring that data is stored in two separate datacenters, at least 400 miles apart from each other
Standard_ZRSStandard Zone Replicated Storage, data replication within a single region across three availability zones, ensuring that data is stored in three separate datacenters in the same region

Container

KeyTypeDescription
name (required)stringThe name of the Container
public_access (required)Public Access DefinitionAccess level for the container

StorageTier

ValueDescription
CoolSuitable for data that is not accessed frequently by applications
HotShould be used for the data frequently accessed by applications, and that is read or written very often
PremiumIdeal for workloads that require very fast response times and/or high transactions rates, such as IoT, Telemetry, AI

PublicAccess

ValueDescription
BlobAllow public read access for blobs
ContainerAllow public read and list access to the entire container
NoneNo anonymous access

Keyvault

KeyTypeDescription
namestringKeyvault name that your Storage Account will have Get access
secretsSecretsThe name and the value of the secret

Secrets

KeyTypeDescription
connection_stringstringThe name of the secret holding the connection string