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
Andrew Larkin
— August 13, 2019

Content Roadmap: AZ-500, ITIL 4, MS-100, Google Cloud Associate Engineer, and More

Last month, Cloud Academy joined forces with QA, the UK’s largest B2B skills provider, and it put us in an excellent position to solve a massive skills gap problem. As a result of this collaboration, you will see our training library grow with additions from QA’s massive catalog of 500+...

Read more
  • AWS
  • Azure
  • content roadmap
  • Google Cloud Platform
Avatar
Andrew Larkin
— August 7, 2019

Disadvantages of Cloud Computing

If you want to deliver digital services of any kind, you’ll need to estimate all types of resources, not the least of which are 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...

Read more
  • AWS
  • Azure
  • Cloud Computing
  • Google Cloud Platform
Orion Withrow
Orion Withrow
— July 24, 2019

How to Effectively Use Azure Management Groups, Subscriptions, and Resource Groups

When used individually, Azure Management Groups, Subscriptions, and Resource Groups are very powerful. But when used together, they can establish the entire organizational structure of Azure. In this article, I will explain Azure Resource Manager, Management Groups, Subscriptions an...

Read more
  • Azure
  • azure management groups
  • azure resource groups
  • azure subscriptions
Alisha Reyes
Alisha Reyes
— July 22, 2019

Cloud Academy’s Blog Digest: July 2019

July has been a very exciting month for us at Cloud Academy. On July 10, we officially joined forces with QA, the UK’s largest B2B skills provider (read the announcement). Over the coming weeks, you will see additions from QA’s massive catalog of 500+ certification courses and 1500+ ins...

Read more
  • AWS
  • Azure
  • Cloud Academy
  • Cybersecurity
  • DevOps
  • Kubernetes
Avatar
Paola Di Pietro
— July 19, 2019

Top 10 Things Cybersecurity Professionals Need to Know

There has been an increase in data breaches over the recent years. With almost 143 million Americans who have had their data compromised in data breaches. These breaches include all sorts of sensitive data, including financial information, election controversies, social security, just t...

Read more
  • Azure
  • cyber security
  • Security
Avatar
Guy Hummel
— June 26, 2019

Running Apache Spark on Azure Databricks

In this article, we’ll cover how to set up an Azure Databricks cluster and how to run queries in an interactive notebook. However, this article only scratches the surface of what you can do with Azure Databricks. If you would like to learn more, including how to create graphs, run sched...

Read more
  • Azure
Avatar
Thomas Mitchell
— June 25, 2019

Understanding the Core Azure Architectural Components

Microsoft Azure relies on a few key architectural components to provide redundancy and high availability. Core Azure architectural components include Azure regions, Azure Availability Zones, resource groups, and the Azure Resource Manager. In this article, we’ll discuss the basics ab...

Read more
  • Azure
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 Storage Archive 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 Storage Microsoft 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