Difference between revisions of "Azure"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "Azure is Microsoft's cloud. '''NOTE''' We will use the [https://docs.microsoft.com/en-us/cli/azure/?view=azure-cli-latest Azure CLI] (Command Line Interface) for all example...")
 
 
Line 18: Line 18:
 
Making each of these things can be tricky.  
 
Making each of these things can be tricky.  
 
The really nice thing about a resource group is you can easily kill them.
 
The really nice thing about a resource group is you can easily kill them.
<syntaxhighlight lang="powershell">
+
<source lang="powershell">
 
az group delete --name truxtonrg --subscription 78E6D3E6-F7D7-4FDF-A9FC-40F014C3D78F --yes
 
az group delete --name truxtonrg --subscription 78E6D3E6-F7D7-4FDF-A9FC-40F014C3D78F --yes
</syntaxhighlight>
+
</source>
 
When you delete a resource group, Azure will conveniently destroy every resource in that group.
 
When you delete a resource group, Azure will conveniently destroy every resource in that group.
 
While you may have carefully toiled to create many intricately connected resources, they can all be killed in an instant.
 
While you may have carefully toiled to create many intricately connected resources, they can all be killed in an instant.
  
 
=How To=
 
=How To=
 
 
When we write [https://docs.microsoft.com/en-us/powershell/ Powershell] scripts to create the pieces of Truxton in Azure, we will typically provide as much information as possible to those scripts.
 
When we write [https://docs.microsoft.com/en-us/powershell/ Powershell] scripts to create the pieces of Truxton in Azure, we will typically provide as much information as possible to those scripts.
 
When creating a resource, the resource group id will be a mandatory parameter while the subscription id is an optional parameter.
 
When creating a resource, the resource group id will be a mandatory parameter while the subscription id is an optional parameter.

Latest revision as of 06:45, 16 February 2021

Azure is Microsoft's cloud.

NOTE We will use the Azure CLI (Command Line Interface) for all example commands.

Subscription

A subscription is basically billing address. A "subscription id" is a GUID.

A subscription id is also known as:

  • Tenant ID
  • Directory ID

Resource Group

Resource groups belong to a subscription. A "resource group id" is a GUID. Everything you create in Azure will belong to a resource group. VMs, virtual networks, database servers, etc. that you create in Azure will belong to a resource group. Making each of these things can be tricky. The really nice thing about a resource group is you can easily kill them.

az group delete --name truxtonrg --subscription 78E6D3E6-F7D7-4FDF-A9FC-40F014C3D78F --yes

When you delete a resource group, Azure will conveniently destroy every resource in that group. While you may have carefully toiled to create many intricately connected resources, they can all be killed in an instant.

How To

When we write Powershell scripts to create the pieces of Truxton in Azure, we will typically provide as much information as possible to those scripts. When creating a resource, the resource group id will be a mandatory parameter while the subscription id is an optional parameter. We will always specify both. We have encountered enough problems that were solved by providing both ids that we will forever provide both to the Azure CLI scripts.