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. Cloud Academy offers a course specifically targeted at understanding the ARM REST API,  the course is called Introduction to Azure Resource Manager.

Introduction to Azure Resource Manager

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 command screenshot
That’s all we’ve got right now for ARM Resource Groups!

Join us for the next post, where we will talk about xPlat Azure CLI. And feel free to add your comments below.

Avatar

Written by

Trevor Sullivan

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

Avatar
Guy Hummel
— June 6, 2019

How to Become a Microsoft Certified Azure Administrator

Microsoft Azure is one of the hottest cloud services on the planet, and it’s growing at a phenomenal rate. This rapid growth has created a huge demand for people who know how to administer and manage Azure implementations.To make it easier for employers to verify the skills of Azure...

Read more
  • Azure
  • exam
Avatar
Guy Hummel
— May 20, 2019

Preparing for the Microsoft AZ-900 Exam

Microsoft has offered Azure certification exams for years, but until recently, they were all meant for technical IT professionals. Now non-technical professionals, such as salespeople and managers, can take the new AZ-900 exam to prove their understanding of Azure fundamentals. People w...

Read more
  • Azure
Avatar
Thomas Mitchell
— May 16, 2019

An Overview of Azure Storage (Part 2)

Archive StorageArchive Storage offers the lowest storage costs of all Azure storage. Its retrieval costs, however, are higher when compared to Hot and Cool storage. The archive tier of storage is designed for data that can tolerate several hours of latency when being retrieved. It’s a...

Read more
  • Azure
  • Storage
Avatar
Thomas Mitchell
— May 14, 2019

An Overview of Azure Storage (Part 1)

Welcome to part one of our series on Azure Storage. Stay tuned for the second part. An Overview of Azure StorageMicrosoft Azure Storage is a cloud-based storage offering that provides multiple storage solutions for organizations. In addition to a massively scalable object store for ...

Read more
  • Azure
  • Storage
Avatar
Giacomo Marinangeli
— March 29, 2019

NEW: Custom Hands-On Labs for Azure and Google Cloud Platform

Harvard Business Review recently estimated that some 90% of corporate training never gets applied on the job. Given the $200B training industry, that is a staggering amount of waste. One reason for the disconnect? Lack of context.Cloud Academy’s platform was built to make it extraor...

Read more
  • Azure
  • Content Engine
  • Google Cloud Platform
  • Hands-on Labs
Avatar
Guy Hummel
— March 28, 2019

How to Become a Microsoft Certified Azure Solutions Architect

Microsoft Azure is the fastest growing cloud provider. Azure’s revenue grew an incredible 76% in the last quarter of 2018. As more and more businesses move their IT infrastructure to Microsoft’s cloud platform, the demand for Azure professionals keeps rising. Since there are relatively ...

Read more
  • Azure
Avatar
Nitheesh Poojary
— March 20, 2019

What is Heroku? Getting Started with PaaS Development

So just what is Heroku? It's a service for developers eager to get their applications online without having to worry about infrastructure details.Metered, pay-as-you-go Cloud Computing services come in all kinds of flavors. Infrastructure as a Service (IaaS) offerings like AWS allow e...

Read more
  • Azure
  • Development & Deploy
Avatar
Nitheesh Poojary
— March 12, 2019

Understanding Object Storage and Block Storage Use Cases

Cloud Computing, like any computing, is a combination of CPU, memory, networking, and storage. Infrastructure as a Service (IaaS) platforms allow you to store your data in either Block Storage or Object Storage formats.Understanding the differences between these two formats - and how ...

Read more
  • Azure
  • Storage
Avatar
Thomas Mitchell
— January 29, 2019

What are Azure Blueprints?

What are Azure Blueprints?Blueprints, in the traditional sense, are used by architects and engineers to design and build new things.  They are used to ensure that the final products are built to specifications and in compliance with certain standards and requirements.Azure Bluepri...

Read more
  • Azure
  • Blueprints
Avatar
Thomas Mitchell
— January 22, 2019

Azure Hybrid Identity Authentication Methods

The move to the cloud is picking up steam.  As such, many corporations are beginning to find themselves supporting a mixture of on-prem apps as well as cloud apps. Users are finding that they need access to this mix of applications as well.  As one would expect, this can become a challe...

Read more
  • Azure
  • Hybrid Cloud
  • Hybrid Identity
Avatar
Andrew Larkin
— January 15, 2019

2018 Was a Big Year for Content at Cloud Academy

As Head of Content at Cloud Academy I work closely with our customers and my domain leads to prioritize quarterly content plans that will achieve the best outcomes for our customers.We started 2018 with two content objectives: To show customer teams how to use Cloud Services to solv...

Read more
  • AWS
  • Azure
  • Cloud Computing
  • Google Cloud Platform
Avatar
Dwayne Monroe
— December 17, 2018

Azure Internet of Things (Azure IoT) – An Introduction

IoT, or the ‘Internet of Things’, is an intriguing and rapidly growing technology that's bringing significant change to important elements of modern life. According to Gartner, IoT security spending alone is set to reach $1.5 billion during 2018.Like many newly minted terms, the def...

Read more
  • Azure
  • IoT