Creating and Configuring an Azure Storage Account

Author

Posted Nov 16, 2024

Reads 1K

Computer server in data center room
Credit: pexels.com, Computer server in data center room

Creating an Azure Storage Account is a straightforward process that requires a few key pieces of information. You'll need to choose a subscription, select a resource group, and provide a unique name for your storage account.

To create a storage account, go to the Azure portal and click on the "Create a resource" button. From there, select "Storage account" and follow the prompts to fill in the required information.

Your storage account will be created in the region you've chosen, and you'll have the option to enable or disable certain features such as static website hosting or data encryption at rest.

Azure offers six types of storage accounts: general-purpose v2, general-purpose v1, blob storage, file storage, queue storage, and table storage.

Creating an Azure Storage Account

To create an Azure storage account, you must belong to an Azure resource group. A resource group is a logical container for grouping your Azure services.

You can either create a new resource group or use an existing one. This is a crucial step, as every Resource Manager resource, including an Azure storage account, must belong to an Azure resource group.

Expand your knowledge: Create Azure Blob Storage

Credit: youtube.com, How to create a storage account | Azure Portal Series

To create an Azure storage account, you need to provide essential information on the Basics tab. This includes selecting the subscription for the new storage account, which is required.

You'll also need to create a new resource group or select an existing one, which is also required. The resource group will be the logical container for your Azure services.

Choose a unique name for your storage account, which must be between 3 and 24 characters in length and can only contain numbers and lowercase letters.

Select the appropriate region for your storage account, as not all regions are supported for all types of storage accounts or redundancy configurations. The choice of region can have a billing impact.

Select Standard performance for general-purpose v2 storage accounts, which is the default and recommended by Microsoft for most scenarios.

Finally, select your desired redundancy configuration, which is also required. Not all redundancy options are available for all types of storage accounts in all regions.

The following table describes the fields on the Basics tab:

Azure Storage Account Parameters

Credit: youtube.com, How to manage a storage account | Azure Portal Series

Azure Storage Account Parameters are crucial to understand when creating a new storage account. You specify the storage account type using the kind parameter, which can be StorageV2 for a Standard general-purpose v2 storage account.

The kind parameter value determines the type of storage account you can create, and it's essential to choose the right one based on your needs. For example, if you need a Standard general-purpose v2 storage account, you should use the value StorageV2.

The following table summarizes the supported values for the kind parameter:

Parameters

When creating a storage account, you'll need to specify the type of account you want to create. This is done using the kind parameter, which can be set to values like StorageV2 or BlockBlobStorage.

The kind parameter determines the type of storage account, such as a standard general-purpose v2 or premium block blobs. For example, if you set the kind parameter to StorageV2, you can create a standard general-purpose v2 storage account with various redundancy configurations.

Credit: youtube.com, ARM Series #3: Parameters

To specify the redundancy configuration, you'll need to use the sku or SkuName parameter. This parameter can be set to values like Standard_LRS or Premium_LRS. For instance, if you set the sku or SkuName parameter to Standard_GRS, you'll create a storage account with standard redundancy and geo-redundant storage.

Here's a summary of the supported values for the kind parameter and the sku or SkuName parameter:

Keep in mind that the kind parameter and sku or SkuName parameter are used together to specify the type of storage account and its redundancy configuration.

Name

Naming your storage account is a crucial step, and it's essential to get it right. Storage account names must be between 3 and 24 characters in length.

You can use numbers and lowercase letters, but be careful not to reuse a name that's already taken by another storage account. Your storage account name must be unique within Azure.

Here are the naming rules in a nutshell:

  • Length: 3 to 24 characters
  • Characters: numbers and lowercase letters only
  • Uniqueness: must be unique within Azure

Azure Storage Account Configuration

Credit: youtube.com, What is Azure Storage | Azure Storage Account Configuration | Azure Security Best Practices

When creating a new storage account, you'll first need to configure the basics, including selecting a subscription and resource group. The Basics tab requires you to choose a unique name for your storage account, which must be between 3 and 24 characters in length and can only contain numbers and lowercase letters.

To ensure your data is secure, you can configure encryption options on the Encryption tab. By default, data in the storage account is encrypted using Microsoft-managed keys, but you can also manage encryption with your own keys.

Here are the required fields to fill out on the Basics tab:

Advanced Tab

In the Advanced Tab of your Azure Storage Account Configuration, you'll find settings that allow for more granular control over your storage account.

The first setting you'll encounter is the "Data encryption" option, which allows you to enable encryption for your storage account.

Enabling encryption is a simple process that can be completed in just a few clicks.

Curious to learn more? Check out: Azure Blob Storage Encryption

Credit: youtube.com, AZ-104 -- Azure Storage Account Creation: Step-by-Step Guide with Configuration Explained

The "Data encryption" option is a crucial security feature that protects your data from unauthorized access.

You can also configure the "Blob public access" setting, which determines whether blobs in your storage account can be accessed publicly.

By default, blobs are not accessible publicly, but you can change this setting to allow public access if needed.

For more insights, see: Azure Blob Storage Access

Get SKU

Getting the SKU for your Azure storage account is a crucial step in configuring it. You can view the account type, location, or replication SKU for a storage account in the Azure portal, PowerShell, or Azure CLI.

To view these properties in the Azure portal, navigate to your storage account and locate them on the Overview page in the Essentials section.

When you're using PowerShell, you can call the Get-AzStorageAccount command to return the storage account, then check the properties. For example, you can use the az storage account show command and query the properties.

The SKU for your storage account will depend on the redundancy configuration you select. If you choose a geo-redundant configuration (GRS or GZRS), your data will be replicated to a data center in a different region.

Get Connection String

Credit: youtube.com, How to get Azure Storage Account Connection String | Azure Storage Account Connection String

To get a connection string for your Azure Storage account, you can use the Azure portal, PowerShell, or Azure CLI.

First, navigate to your storage account in the Azure portal.

To get a connection string in the Azure portal, locate the Access keys setting in the Security + networking section.

Select the Show keys button at the top of the page to display the account keys and associated connection strings.

You can then copy a connection string to the clipboard by selecting the Copy button to the right of the connection string.

Alternatively, you can use PowerShell to get a connection string. First, get a StorageAccountContext object, then retrieve the ConnectionString property.

If you prefer to use Azure CLI, call the az storage account show-connection-string command.

You might enjoy: Azure Connection String

Azure Storage Account Security

Data in your storage account is automatically encrypted on the service side, providing an additional layer of security for your data.

Encryption type is a required field when creating a storage account, and you can choose between Microsoft-managed keys and customer-managed keys.

Credit: youtube.com, How to secure your azure storage account? | Azure Account Security Features | DP - 203 Tutorial Ep 6

To enable customer-managed keys, you must set the "Enable support for customer-managed keys" option to "All service types" or "blobs and files".

If you choose customer-managed keys, you'll need to provide a key vault and key, or enter a key URI and subscription.

A user-assigned identity is also required for authorizing access to the key vault when configuring customer-managed keys at create time.

Here are some key encryption options to consider when creating a storage account:

Data Protection Tab

The Data Protection Tab is a crucial section when setting up your Azure Storage account. Here, you can configure options that relate to how your data is encrypted when it's persisted to the cloud.

Encryption type is a required field, and by default, data in the storage account is encrypted by using Microsoft-managed keys. However, you can also choose to manage encryption with your own keys.

To enable support for customer-managed keys, you need to set the option to All service types (blobs, files, tables, and queues). This allows you to use customer-managed keys for all services, but it's not required.

Credit: youtube.com, Azure Storage Account Data Protection

If you choose to use customer-managed keys, you'll need to provide an encryption key and a user-assigned identity to use for authorizing access to the key vault.

Here's a summary of the required fields when using customer-managed keys:

It's worth noting that all data in your storage account is automatically encrypted on the service side, providing an additional layer of security.

Access Key Creation Time

To get the creation time of the account access keys for a storage account, you can use the Azure portal, PowerShell, or Azure CLI.

You can check the keyCreationTime for a storage account by using the Azure portal, PowerShell, or Azure CLI. If the keyCreationTime property of one or both of the account access keys for a storage account is null, you will need to rotate the keys before you can configure a key expiration policy or a SAS expiration policy.

To display the creation time of the account access keys for a storage account in the Azure portal, follow these steps:

  1. Navigate to your storage account in the Azure portal.
  2. On the Overview page, in the Essentials section, select the JSON View link.
  3. On the Resource JSON page, select the most recent API version.
  4. In the JSON under properties you will see the keyCreationTime for key1 and key2.

You can also use PowerShell to get the keyCreationTime property, which includes the creation time for both keys. Make sure you have installed the Az.Storage module and call the Get-AzStorageAccount command.

Credit: youtube.com, Manage access keys of an Azure Storage Account

The creation time of the account access keys for a storage account can also be returned using the Azure CLI. Call the az storage account show command and query the keyCreationTime.

You can get the keyCreationTime for a storage account by calling the Storage Accounts - Get Properties operation in the REST API.

Frequently Asked Questions

What is the difference between storage account and database in Azure?

In Azure, a storage account stores raw, unstructured files, while a database (such as SQL Db or Cosmos Db) stores structured data in a database file within the storage system. Think of storage as a file cabinet and databases as a catalog system, each serving a distinct purpose.

What is the difference between container and storage account in Azure?

A storage account in Azure is the top-level entity that holds multiple containers, while a container is a sub-entity that stores a collection of blobs, similar to a directory in a file system. In essence, a storage account is the parent, and a container is a child that holds its own set of data.

What is a storage account in Azure?

A storage account in Azure is a centralized container for all your Azure Storage data, including blobs, files, queues, and tables. It provides a unique namespace for your data, accessible globally over HTTP or HTTPS.

What is the difference between Azure files and storage account?

Azure Files is designed for structured data with shared access, while Azure Blob Storage is ideal for unstructured data. The main difference lies in how they handle data types, not storage account types.

What is the difference between GPv1 and GPv2?

GPv1 and GPv2 differ in that GPv2 supports Azure Drives, while GPv1 does not. GPv2 is the recommended choice for most use cases due to its added feature and improved performance

Tanya Hodkiewicz

Junior Assigning Editor

Tanya Hodkiewicz is a seasoned Assigning Editor with a keen eye for compelling content. With a proven track record of commissioning articles that captivate and inform, Tanya has established herself as a trusted voice in the industry. Her expertise spans a range of categories, including "Important" pieces that tackle complex, timely topics and "Decade in Review" features that offer insightful retrospectives on significant events.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.