Blog Post

ITOps Talk Blog
2 MIN READ

Manage your Azure resources using automation tasks

thomasmaurer's avatar
thomasmaurer
Icon for Microsoft rankMicrosoft
Feb 24, 2021

There are different ways to manage your Azure resources depending on your specific needs. With automation tasks, Azure offers a simple way to manage a specific resource or resource group using automation task templates. These templates depend on the Azure resource. For example, for an Azure virtual machine, you can create an automation task that turns on or turns off that virtual machine on a predefined schedule or sends the resource's monthly cost. This can be especially helpful if you are trying to reduce the cost of your Azure VMs.

An automation task is actually a workflow that runs on the Azure Logic Apps service behind the scenes. Automation tasks are currently in preview and support sending monthly cost for all Azure resources and special templates for Azure virtual machines, Azure Storage accounts, and Azure Cosmos DB.

 

You might now think how this is different from Azure Automation. For that, you can check out the following article on Microsoft Docs.

 

 

How to create an automation task

Creating an automation task is simple. In the Azure Portal, find the resource you want to manage, and on the resource menu, scroll to the Automation section and select Tasks.

 

Create automation task for an Azure resource

 

Now you will see the existing automation tasks, or you can click on Add to add a new automation task from a template.

 

Add a Task

 

You can select the template you want to use. Under Authentication, the necessary connections for that specific task appear. You will need to create these connections.

Authentication

 

In the configuration section, you can add additional information for the task. In this example, I start the virtual machine every day at 10 am.

 

Task Configuration

 

After the automation task has been created, you can see it under Tasks. You can see the tasks and view the runs, as well as edit the task.

 

View and edit automation tasks

You can do in-line editing to make simple changes, but you can also open it in the Logic Apps Designer.

 

Logic Apps Designer

 

Conclusion

Automation Tasks is currently in preview and provides an easy and simple way to manage Azure resources. If you want to learn more, check out Microsoft Docs. If you want to provide feedback, report bugs, or ask questions, you can contact the Azure logic Apps team.

 
Updated May 11, 2021
Version 3.0
  • Hmmm,

     

    Wondering what is official stance of Microsoft Azure about automation of resources in Azure. Per portal one shall rely on Logic Apps while documentation and common sense says to use Azure Automation. It would be good to invest time and energy in learning one tool for automating resources and not 2 completely different tools which seems to be target to perform similar functions.

  • KarzAndreas's avatar
    KarzAndreas
    Brass Contributor
    Unfortunately I always get the following error with my MSDN subscription.

     

    {
      "error": {
        "code": "InvalidAuthenticationTokenTenant",
        "message": "The access token is from the wrong issuer 'https://sts.windows.net/*****/'. It must match the tenant 'https://sts.windows.net/*****/' associated with this subscription. Please use the authority (URL) 'https://login.windows.net/*****' to get the token. Note, if the subscription is transferred to another tenant there is no impact to the services, but information about new tenant could take time to propagate (up to an hour). If you just transferred your subscription and see this error message, please try back later."
      }
    }