Creating storage for the website accessible to the general public, soft delete and versioning
Tags: cloudcomputing, azure, programming, beginners
Published: 2023-12-02 20:56:58

## 
Customer success stories, marketing materials, product photos, and videos are all available on the corporate website. Clients come from all around the world, and demand is growing quickly. Low latency load times are required for the content because it is mission-critical. It's critical to monitor document versions and act swiftly to recover destroyed documents.

## Creating a storage account with high availability
- In the market place search for storage account and select create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vp1c54qijr0m1ndbjkup.png)
- In the project details, select the resource group you just created
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m2eq3f1fnh08vr5gwicn.png)
- Under the instance details, supply the name for your storage account. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/11jorex44mu1qwk97mkp.png)
- Click review
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jno3uskc3wzgzj0uaani.png)
- Once validation is passed, click create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/27ibc3nsb7m7ikhvhm95.png)
- Wait for it to deploy
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7elfe65abtysjx80f1w3.png)
- After deployment is done, click go to resource
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u3ow8hdmlubfktlvi6yu.png)
- After clicking go to resource, in the data management section, select redundancy blade
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rw2cfqusuc7qbm4i44ej.png)
- Select Read -access Geo-redundant storage
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9rl8zpx7y03lnvte49zv.png)
- Click save
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ob76yqmsp7zqlexf27w.png)

## Enabling Allow blob anonymous access
Customers should not need to log in to obtain information on the public website.
- in the settings section, select configuration
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xt01p9excu7fk93hsaea.png)
- Enable allow blob anonymous access
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mprt3qzprj6wb8ys2a03.png)

## Create a container for blob storage with anonymous read access.
- Select containers in the Data storage section
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eei2wsydx1c9jiz24yx8.png)
- Select + container
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7coopn6deoy50v9q1p3a.png)
- Supply the name for the container and click create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qw2sjzbgdn0zydqjizov.png)

- Clients ought to be able to see the pictures without requiring authentication. Set up read access to the public container blobs anonymously.
- Select the newly created container
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x81p94epihlgj0qkvc2t.png)
- Click change access level
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/unef85oi1a6ihhx2p18o.png)
- change access level to blob(anonymous read access for blobs only)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f7hengoylzuznnvy4y7x.png)
- Click Ok
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tjlxbn7yd3v0w1ud5ngn.png)

## Testing the container for access.
- After changing the access level, click upload to send a file into the container
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/83vcivjbrijlg6f94epn.png)
- Click browse a file to select a file to upload
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dezn98xsx0366hrdkygt.png)
- After selecting a file, click upload
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kdwxiw1pq7hnl4qqvyik.png)
- Click on the uploaded file
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0t52n7j0vnjwdjrtlojv.png)
- Copy the url in the overview tab
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bwl1brpmf3fki1sn31jt.png)
- Search the copied url in a new browser and it will be displayed in the browser

## Setting up soft delete
- Return to the overview page and select blob soft delete in the blob service section
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/97livd0eb9ggignbu6s9.png)
- Click Enabled(7 days) in front of soft delete, Tick enable soft delete for blobs and change the keep deleted blobs for (in days) to 21 days 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eusjhb78w9062vdx7ary.png)
- Click save
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u2myvkld3vjn1n8arn5o.png)

## Testing the configured soft delete
- Go to the container containing our uploaded file and delete the file
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mrn1mbawrkyicf5eg4e4.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n3yjko1eczds2wars6fs.png)
- Click on the slider beside show deleted blobs to show deleted files
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qs93uvtl05cv1gher3o0.png)
- Click the ellipses on the extreme right, select undelete to restore the deleted file
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jzdrryh1kifdl5pd0kgt.png)

## Setting up blob versioning
- Still under the overview page of the storage account, in the properties section under blob service, click Disabled in front of versioning to go to the versioning settings
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/85xcvb4s3mkxu1eq6xrq.png)
- Tick enable versioning for blobs
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ugvqhdf23dypxqxpaqrt.png)
- Click save
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d5i3hi9fnuu47gb6uhlb.png)

## Testing the versioning set up 
- Go to the container to upload another version of the initial uploaded file. This will overwrite the existing file.
- To get the list of the previous file, click the ellipses at the extreme right of the file and select view versions
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/onrw5s7xbuy3gqj0ikhq.png)
- This will bring a pane showing all the previous versions
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jdz6z7zs83knqq7u40wh.png)