DEV Community

Cover image for Step by Step Guide: how to provide storage for a new company app
Oluwanifesimi
Oluwanifesimi

Posted on

Step by Step Guide: how to provide storage for a new company app

As businesses continue to evolve in an increasingly digital world, a robust and reliable storage solution is the backbone of any modern application. Our new company app is built to support seamless user interactions, real-time data access, and secure document handling—and at the center of this functionality is a trusted cloud-based storage infrastructure powered by Microsoft Azure.

Why Storage Matters
From user files and transaction histories to app configurations and media uploads, the volume of data a modern app handles is immense. Reliable storage isn’t just a convenience—it’s a necessity.

Key Benefits of Cloud Storage:
Scalability: Easily grows with your app’s user base.

Accessibility: Data is accessible from anywhere, anytime.

Security: Enterprise-grade protection and compliance.

Cost-Effectiveness: Pay for only what you use.

What Is a Storage Account in Azure?
A Storage Account in Azure is a centralized container for hosting all your data services. It enables access to:

Blob Storage – for unstructured data like PDFs, DOCX files, or scanned images
File Shares – for mounting storage across networked systems
Tables – for structured NoSQL data
Queues – for message-driven workflows
Disks – for VM-based systems

When creating a storage account, you define:
Region – geographic location for data residency
Performance Tier – Standard or Premium based on speed needs
Replication Strategy – LRS, GRS, ZRS to safeguard against outages
Security Configurations – including access policies, encryption, and firewalls

Azure lets developers choose between Standard and Premium performance tiers, as well as replication options like LRS, ZRS, and GRS—giving full control over cost, availability, and performance.

Step by Step: On how to Provide storage for a new Company App

Create the storage account and managed identity

1. Provide a storage account for the web app.

  • In the portal, search for and select Storage accounts. portal search
  • Select + Create. select and create

-For Resource group select Create new. Give your resource group a name and select OK to save your changes, Provide a Storage account name, Ensure the name is unique and meets the naming requirements.
rg/srg

  • Move to the Encryption tab, Check the box for Enable infrastructure encryption. Notice the warning, This option cannot be changed after this storage account is created. Select Review + Create. encryption Wait for the resource to deploy. deployed

2. Provide a managed identity for the web app to use.

  • Search for and select Managed identities. manage identities
  • Select Create. create identities
  • Select your resource group. select Rg
  • Give your managed identity a name, Select Review and create. managed name Then Create

3. Assign the correct permissions to the managed identity. The identity only needs to read and list containers and blobs.

  • Search for and select your storage account. Storage account SRG
  • Select the Access Control (IAM) blade. IAM
  • Select Add role assignment (center of the page). add role assign
  • On the Job functions roles page, search for and select the Storage Blob Data Reader role. Blob data On the Members page, select Managed identity, Select Select members, in the Managed identity drop-down select User-assigned managed identity, Select the managed identity you created in the previous step. user-assigned
  • Click Select and then Review + assign the role. review
  • Select Review + assign a second time to add the role assignment. review again Your storage account can now be accessed by a managed identity with the Storage Data Blob Reader permissions.

Secure access to the storage account with a key vault and key

1. To create the key vault and key needed for this part of the lab, your user account must have Key Vault Administrator permissions.

  • in the portal, search for and select Resource groups. RG1 RG2 Select your resource group, and then the Access Control (IAM) blade. Select Add role assignment (center of the page). role assignment
  • On the Job functions roles page, search for and select the Key Vault Administrator role. vault
  • On the Members page, select User, group, or service principal, Select Select members, Search for and select your user account. Your user account is shown in the top right of the portal. member
  • Click Select and then Review + assign. rev 1
  • Select Review + assign a second time to add the role assignment. rev 2 You are now ready to continue with the lab.

2. Create a key vault to store the access keys.

  • In the portal, search for and select Key vaults. key vault
  • Select Create. create key vault
  • Select your resource group, Provide the name for the key vault. The name must be unique. RG/KEY vault name
  • Ensure on the Access configuration tab that Azure role-based access control (recommended) is selected. RBAC
  • Select Review + create. Wait for the validation checks to complete and then select Create. Create
  • After the deployment, select Go to resource. goto
  • On the Overview blade ensure both Soft-delete and Purge protection are enabled. purge/protection

3. Create a customer-managed key in the key vault.

  • In your key vault, in the Objects section, select the Keys blade and Select Generate/Import. select key blade
  • Name the key and Take the defaults for the rest of the parameters, and Create the key. name key

Configure the storage account to use the customer managed key in the key vault

1. Before you can complete the next steps, you must assign the Key Vault Crypto Service Encryption User role to the managed identity.

  • In the portal, search for and select Resource groups. search RG
  • Select your resource group, and then the Access Control (IAM) blade. SELECT IAM
  • Select Add role assignment (center of the page). add role
  • On the Job functions roles page, search for and select the Key Vault Crypto Service Encryption User role. key vault crypto
  • On the Members page, select Managed identity, Select Select members, in the Managed identity drop-down select User-assigned managed identity. Select your managed identity, then Click Select select all
  • Review + assign. review+assign
  • Select Review + assign a second time to add the role assignment. 2nd time

2. Configure the storage account to use the customer managed key in your key vault.

  • Return to your the storage account. srg1 srg2
  • In the Security + networking section, select the Encryption blade, Select Customer-managed keys, Select a key vault and key. security & key
  • Select your key vault and key, Select to confirm your choices. key vault&key
  • Ensure the Identity type is User-assigned, Select an identity. select identity
  • Select your managed identity then select Add. select add
  • Save your changes. save changes If you receive an error that your identity does not have the correct permissions, wait a minute and try again.

Configure an time-based retention policy and an encryption scope.

1. The developers require a storage container where files can’t be modified, even by the administrator.

  • Navigate to your storage account. navigate
  • In the Data storage section, select the Containers blade, click on add container container
  • Create a container called hold. Take the defaults. Be sure to Create the container.
    hold container

  • Upload a file to the container.
    upload file

  • In the Settings section, select the Access policy blade, In the Immutable blob storage section, select + Add policy.
    Immutable blob

  • For the Policy type, select time-based retention.
    policy type

  • Set the Retention period to 5 days, Be sure to Save your changes.
    retention period

  • Try to delete the file in the container.
    Verify you are notified failed to delete blobs due to policy.
    delete file

2. The developers require an encryption scope that enables infrastructure encryption.

  • Navigate back to your storage account.
  • In the Security + networking blade, select Encryption, In the Encryption scopes tab, select Add, Give your encryption scope a name, The Encryption type is Microsoft-managed key. Set Infrastructure encryption to Enable, Create the encryption scope. infrascope Return to your storage account and create a new container.

create new container

  • Notice on the New container page, there is the Name and Public access level.
  • Notice in the Advanced section you can select the Encryption scope you created and apply it to all blobs in the container.

notice
notice2

Final Thoughts
Choosing the right storage solution for a new company app isn’t just about capacity—it’s about scalability, security, and future-proofing your architecture. Whether you opt for a cloud-based service, local infrastructure, or a hybrid approach, the key is building with adaptability in mind. The decisions you make today lay the groundwork for tomorrow’s growth and innovation. Make it count.

Written by Oluwanifesimi

Top comments (0)