DEV Community

Cover image for Creating Private Storage in Microsoft Azure
Jimi
Jimi

Posted on

Creating Private Storage in Microsoft Azure

We'll be going over creating a storage account and adding files for private access. Feel free to look at my many posts discussing how to do this if you're confused.

  1. Create a Storage Account and Configure High Availability

    • Ensure Geo-redundant storage (GRS) is selected when creating your storage account.
    • Once your storage account is created, navigate to the resource. Creating the storage account
  2. Create a Storage Container, Upload a File, and Restrict Access

    • Locate the Data storage section and select Containers. Locating Containers
    • Click +Container, create a name for your container, then click Create. Creating the Container
    • Navigate to your created container, click Upload, add a file, and click Upload. Uploading a file
    • Click the file you uploaded, copy the URL link, and paste it into your browser to confirm you're unable to view the file. Copying the blob link Verifying the file in inaccessible
  3. Configure Access with a Shared Access Signature (SAS)

    • Go back to your file and click on Generate SAS. Clicking Generate SAS
    • Set permissions to Read and adjust the Expiry to 24 hours from the current time.
    • Click Generate SAS token and URL. Configuring expiration time
    • Copy the generated Blob SAS URL and paste it into your browser to verify access. Copying the URL Viewing the uploaded file
  4. Configure Storage Access Tiers and Content Replication

    • Move blobs from the Hot tier to the Cool tier after 30 days to optimize costs.
    • Navigate back to the overview of your Storage Account.
    • Locate Lifecycle Management under Data Management. Changing the lifecycle
    • Click Add a rule. Locating the Lifecycle Rules
    • Create a name for your rule, leave other settings as default, and click Next. Naming the rule
    • Set the if condition to Last Modified and change More than (days ago) to 30.
    • Change the then condition to Move to cool storage and click Add. Creating the rule conditions

We've now configured a lifecycle policy for our private files.

Remember to delete all resources once you're done.

Top comments (0)