Azure Storage Actions, a service in public preview for serverless storage data management

Introduction
Azure rolled out a new service in public preview in February of this year (I am a bit late, I know) called Azure Storage Actions. Effective data management is essential for businesses to fully leverage their data assets, meet compliance regulations, reduce costs, and safeguard sensitive information and this service should help with that.
It's crucial to manage your data smartly, staying on the right side of the law, cutting costs, and keeping sensitive info safe.
This is where Azure Storage Actions comes into play. It lets you set up automated tasks for managing heaps of data, no matter where it's stored. Plus, it's smart enough to keep an eye on everything for you, showing you the big picture or the nitty-gritty details whenever you need them. Right now, it's great for saving money, protecting your data, and a bunch of other stuff, with even more features on the way.
They have included a built in validation function so you can test your actions safely before actually applying anything. If you do not want to use the portal you can manage the service via REST APIs and Azure SDK and includes support for Powershell, AZ CLI and ARM templates, which in extension means you should be able to manage it via Bicep and Terraform as well.
The preview includes support to work with Azure Blob Storage and Azure Data Lake Storage.
Cost
Azure allows us to preview Azure Storage Actions for data management for our object storage. We can try the feature for free during the preview, paying only for transactions invoked on our storage account. Pricing information for the feature will be published before general availability.
Testing the feature
You can clone my repository here where I have provided some starter configuration to deploy pre-requisite resources:
- Resource group
- Storage account
- Blob container
- Storage task - Action
git clone git@github.com:carlzxc71/azure-storage-actions-starter.git
az login
az account set -s <sub-id>
cd azure-storage-actions-starter/terraform/
terraform init
terraform plan
terraform apply -auto-approve
You can deploy the solution using the commands above, you need an Azure Subscription, Terraform and AZ CLI installed on your machine. It will be deployed in Central France as that is one of two currently supported regions, the other is Canada Central according to the feature support page
The code I have written will automatically create a Storage Task which will look for:
- If: Documents that end with .xlsx
- Action: Set to cool tier
- Action: Apply tag
Maybe a stupid scenario but the point is to showcase that these types of things are possible and to save time Terraform with set it all up for us we simply need to deploy, upload a document & create an assignment.
After you have run the code head to the Portal
- In the searchbar look for the storage account by searching for stdemostorageactions and select it
- Select Containers and select the created container
- Select Upload and upload any random Excel document
- Notice it will have the Hot tier

- In the search bar enter mystoragetask to find the Storage Action we have created
- Select Conditions and ensure we see the following

- Select Assignment and create one similar to this one:

- Enable the task

- Once enabled, give it some time to run the task, if you allowed the run date to be default it should happen within a few minutes
- Select Tasks Runs in the left pane and refresh a few times until you can see your run
- Once completed you should head back to your storage container which now should have moved your file to the Cool tier and applied the tag


Reference

About me
