SpyglassMTG Blog

  • Blog
  • Managing Azure Virtual Machines with Logic Apps and Microsoft Teams

Managing Azure Virtual Machines with Logic Apps and Microsoft Teams

Managing Azure Virtual Machines with Logic Apps and Microsoft Teams

"I just checked in to see what condition my condition was in..."

That line from the famous Kenny Rogers song, made well known in The Big Lebowski, seems to describe the state that most of us IT folks are living in. Too much to do, too little time, and not enough folks to help. So, let’s make our lives easier by utilizing a set of Microsoft tools to do the work for us!

The Scenario

Your company or client asks you to create multiple vendors' jump boxes that need to be started up and deallocated during specific durations to allow for short- timed vendor access to save on resource cost. The kicker is that its not a set time or length. One vendor may need access for a couple of days and another may need access for a couple of months. It also may change at any time… and there are hundreds of vendors each with their own jump box. A scenario like this can turn into a full-time job in and of itself and, well, you’ve already got a full-time job, so that isn’t going to work. You can’t just use built in VM tools to do this because its not a set period or length.

The Solution

Logic Apps has a whole host of built-in actions for managing Azure Virtual Machines. The only thing you need to do is come up with the parameters being dynamically passed in and you have your solution.

Logic App Azure VM Steps

Utilizing Microsoft Teams, you can create a list that has all your Virtual Machines in it. Beyond the obvious start up and deallocating date/times, a couple of other parameters that you’ll need are Subscription Id and Resource Group. Now you can setup the Logic App to run in a set period of iteration (once a day or check the list every hour if time is important) and build logic to see if it falls between start and deallocate. If so, start it up! If it’s past the deallocate time, shut it down! Now, you can just use your list to manage it or better yet…have someone else do it! 😊

The Bonus

Along with being able to manage the start up and deallocation of virtual machines via a Teams list, there are added benefits that can now be implemented. Notifications can be sent to internal IT personnel of impending start ups and deallocations as well error handling for notifications about vendor jump boxes that did not start/stop correctly. Automated notifications to vendors of availability are another added feature.

Conclusion

The inclusion of Azure Virtual Machine actions in Logic Apps gives the potential for an easy way to manage large amounts of virtual machines with the use of a Teams list while being able to add in other automation such as notifications for error handling and success to provide a great time saving potential with a small amount of development time. If you would like to discuss this topic further, please contact us today!

Related Posts
Microsoft Power BI Price Update
Microsoft Teams Phone Price Update