| title | Quickstart: Create a storage task by using Bicep |
|---|---|
| titleSuffix | Azure Storage Actions |
| description | Learn how to create a storage task by using Bicep. |
| ms.service | azure-storage-actions |
| author | normesta |
| ms.author | normesta |
| ms.topic | quickstart-bicep |
| ms.custom | subject-bicepqs |
| ms.date | 05/05/2025 |
This quickstart describes how to create a storage task by using Bicep.
[!INCLUDE About Bicep]
If you don't have an Azure subscription, create a free account before you begin.
The Bicep file used in this quickstart is from Azure Quickstart Templates.
:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.storage.actions/storage-task/main.bicep":::
The Microsoft.StorageActions/storageTasks Azure resource is defined in the Bicep file.
-
Save the Bicep file as main.bicep to your local computer.
-
Deploy the Bicep file using either Azure CLI or Azure PowerShell.
az group create --name exampleRG --location <region>
az deployment group create --resource-group exampleRG --template-file main.bicep --parameters storageTaskName="<storage-task-name>" description="<description>"
New-AzResourceGroup -Name exampleRG -Location <region>
New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep -storageTaskName "<storage-task-name>" -description "<description>"
-
In the Azure portal, search for Storage Tasks. Then, under Services, select Storage tasks - Azure Storage Actions.
-
In the list of storage tasks, search for the name of the storage task that you deployed.
When no longer needed, delete the resource group. The resource group and all the resources in the resource group are deleted. Use the following command to delete the resource group and all its contained resources.
az group delete --name <resource-group-name>
Remove-AzResourceGroup -Name <resource-group-name>
Replace <resource-group-name> with the name of your resource group.
Assign a storage task to a storage account.
[!div class="nextstepaction"] Create and manage a storage task assignment
