Skip to main content

Azure Resource Manager: Create Azure Resource Groups with xPlat

You can use the xPlat CLI tool from multiple guest operating systems to manage your Azure Resource Groups in the Resource Manager.

In my last article, we took a look at the Microsoft Azure Cross-Platform (xPlat) CLI Tool, some of its essential functions, how to install it, and how to authenticate to Microsoft Azure. We also looked at how to query for a list of Azure subscriptions, change our current subscription context, and switch between Azure’s REST APIs.
It’s time to learn a little bit more about the Azure Resource Manager (ARM) REST API architecture, in order to effectively perform automation tasks against your Microsoft Azure subscription. In fact, Cloud Academy will be offering a course specifically targeted at understanding the ARM REST API. Keep an eye on the Cloud Academy Roadmap for more information about upcoming Microsoft training courses.

xPlat: Managing ARM Azure Resource Groups

Once you’ve got an Azure subscription, the first step to provisioning cloud resources, of all types, is to create a container called a Resource Group. Although Azure Resource Manager is a multi-master, global service, Resource Groups are associated with one of the Azure “regions” (also called “locations”). You can get a list of Azure locations by using the “azure location list” command. Once you’ve selected an Azure region to create your Resource Group in, use the azure group create command to create it:

azure group create --name CloudAcademy --location westus

After calling this command, you will have created a new, empty Azure Resource Group.
After creating a Resource Group, you can deploy resources into it using declarative or imperative provisioning. You can also provision resources declaratively at the time you create the Resource Group. However for the purposes of learning, it’s easier to learn the individual components of the process. Once you understand the core concepts of ARM, you can use short cuts to enhance your productivity.
To perform declarative provisioning, you first need to create or obtain an ARM JSON Template. Microsoft provides plenty of examples of ARM JSON Templates in the “Azure QuickStart Templates” Git repository on GitHub.
To perform imperative provisioning, there are different command branches for each supported Azure platform feature. For example:

azure network
azure vm
azure storage
azure webapp
azure apiapp
azure rediscache

… and more!
Before we talk about provisioning resources, let’s cover Azure Resource Groups a bit more. We’ve already looked at how to create an Azure Resource Group, but what else can we do with them?
This command:

azure group list

…will display a list of all the Azure Resource Groups in your current subscription. The azure group delete command:

azure group delete

…will remove the specified Azure Resource Group, and all of the cloud resources that are contained within it.
If you have an existing Azure Resource Group, but want to add or remove “tags” (key-value pairs of user-defined metadata), you can use the

azure group set

command. In fact, let’s go ahead and assign a tag now. To assign a tag, use the following command:

azure group set --name CloudAcademy --tags 'Department=Marketing’

You should see a message, indicating that the command was successful:
Azure Resource Group
That’s all we’ve got right now for ARM Resource Groups! Join us for the next post, where we will talk about imperative provisioning of cloud resources into Azure Resource Groups. And feel free to add your comments below.

Written by

Trevor Sullivan is a Microsoft MVP for Windows PowerShell, and a Curriculum Director for Cloud Academy. Trevor is passionate about technology, community, and social media, and enjoys sharing information with the world at large, through a variety of mediums. As a public speaker, Trevor also enjoys delivering webcasts, presenting live at conferences, and both live and virtually at user groups across the world.

Related Posts

— November 21, 2018

Google Cloud Certification: Preparation and Prerequisites

Google Cloud Platform (GCP) has evolved from being a niche player to a serious competitor to Amazon Web Services and Microsoft Azure. In 2018, research firm Gartner placed Google in the Leaders quadrant in its Magic Quadrant for Cloud Infrastructure as a Service for the first time. In t...

Read more
  • AWS
  • Azure
  • Google Cloud
— October 30, 2018

Azure Stack Use Cases and Applications

This is the second of a two-part series covering Azure Stack. Our first post provided an introduction to Azure Stack. Why would your organization consider using Azure Stack? What are the key differences between Azure Stack and Microsoft Azure? In this post, we'll begin to answer bot...

Read more
  • Azure
  • Hybrid Cloud
  • Virtualization
— October 3, 2018

Highlights from Microsoft Ignite 2018

Microsoft Ignite 2018 was a big success. Over 26,000 people attended Microsoft’s flagship conference for IT professionals in sunny Orlando, Florida. As usual, Microsoft made a huge number of announcements, ranging from minor to major in importance. To save you the trouble of sifting thr...

Read more
  • Azure
  • Ignite
— September 20, 2018

Planning for Microsoft Ignite 2018 Sessions: What Not to Miss

Cloud Academy is proud to be a sponsor of the Microsoft Ignite Conference to be held September 24 - 28 in Orlando, Florida. This is Microsoft’s biggest event of the year and is a great way to stay up to date on how to get the most from Microsoft’s products. In this post, I’ll help you p...

Read more
  • Azure
— September 18, 2018

How to Optimize Cloud Costs with Spot Instances: New on Cloud Academy

One of the main promises of cloud computing is access to nearly endless capacity. However, it doesn’t come cheap. With the introduction of Spot Instances for Amazon Web Services’ Elastic Compute Cloud (AWS EC2) in 2009, spot instances have been a way for major cloud providers to sell sp...

Read more
  • AWS
  • Azure
  • Google Cloud
— August 23, 2018

What are the Benefits of Machine Learning in the Cloud?

A Comparison of Machine Learning Services on AWS, Azure, and Google CloudArtificial intelligence and machine learning are steadily making their way into enterprise applications in areas such as customer support, fraud detection, and business intelligence. There is every reason to beli...

Read more
  • AWS
  • Azure
  • Google Cloud
  • Machine Learning
— July 5, 2018

How Does Azure Encrypt Data?

In on-premises environments, data security is typically a siloed activity, with a company's security team telling the internal technology groups (server administration, database, networking, and so on) what needs to be protected against intrusion.This approach is absolutely a bad...

Read more
  • Azure
— June 26, 2018

Disadvantages of Cloud Computing

If you want to deliver digital services of any kind, you’ll need to compute resources including CPU, memory, storage, and network connectivity. Which resources you choose for your delivery, cloud-based or local, is up to you. But you’ll definitely want to do your homework first.Cloud ...

Read more
  • AWS
  • Azure
  • Cloud Computing
  • Google Cloud
Albert Qian
— June 19, 2018

Preparing for the Microsoft Azure 70-535 Exam

The credibility of Microsoft Azure continues to grow in the first quarter of 2018 with an increasing number of enterprises migrating their workloads, resulting in a jump for Azure from 10% to 13% in market share. Most organizations will find that simply “lifting and shifting” applicatio...

Read more
  • Azure
  • Compute
  • Database
  • Security
— April 12, 2018

Azure Migration Strategy: A Checklist to Get Started

By now, you’ve heard it many times and from many sources: cloud technology is the future of IT. If your organization isn’t already running critical workloads on a cloud platform (and, if your career isn’t cloud-focused), you’re running the very real risk of being overtaken by nimbler co...

Read more
  • Azure
— March 2, 2018

Three Must-Use Azure Security Services

Keeping your cloud environment safe continues to be the top priority for the enterprise, followed by spending, according to RightScale’s 2018 State of the Cloud report.The safety of your cloud environment—and the data and applications that your business runs on—depends on how well you...

Read more
  • Azure
  • Security
— February 15, 2018

Is Multi-Cloud a Solution for High Availability?

With the average cost of downtime estimated at $8,850 per minute, businesses can’t afford to risk system failure. Full access to services and data anytime, anywhere is one of the main benefits of cloud computing.By design, many of the core services with the public cloud and its underl...

Read more
  • AWS
  • Azure
  • Cloud Adoption
  • Google Cloud