Useful Azure Resources

Reading Time: 4 minutes

New to Azure

Learning resources

  • Microsoft Learn
    Microsoft Learn is a free, online training platform that provides interactive learning for Microsoft products and more.

  • Microsoft Docs
    The home for Microsoft documentation and learning for developers and technology professionals.

  • Free Azure E-books
    Deepen your understanding of cloud computing with analyst publications, guides, and infographics for technical professionals and business leaders.

  • Channel 9/Learn Live
    Presenting Microsoft Learn content Live. Every episode Microsoft choose a Learn module and work through it. They pull in guests to give you extra commentary from experts and sometimes even the engineers who built it. Join and ask questions, live!

  • Microsoft Trainer Community Channel
    Microsoft Trainer Community YouTube channel

  • Azure Friday
    Join Scott Hanselman, Donovan Brown, or Lara Rubbelke as they host the engineers who build Azure, demo it, answer questions, and share insights.

  • Azure Tuesday
    Corey Sanders answers your questions about Microsoft Azure – Virtual Machines, Web Sites, Mobile Services, Dev/Test etc. If you have a question, Corey will find the answer!

  • John Savill’s Technical Training
    A curated set of free learning videos from John Savill and other free resources to help you master Azure. (Not a Microsoft channel)

  • Azure for Everyone by Adam Marczak
    Free training on YouTube by Microsoft MVP Adam Marczak

  • Plural Sight
    Pluralsight offers courses on everything “Azure” – from cloud application development, to cloud infrastructure, to cloud security and much more.

  • LinkedIn Learning
    Training courses on LinkedIn Learning provide you with the skills you need, from the fundamentals to advanced tips.

  • Udemy
    Udemy is an online learning and teaching marketplace with over 185000 courses and 49 million students. The site includes a large number of Azure related training, free and courses at affordable rates.

  • Travis Roberts
    Microsoft MVP Travis Roberts runs a YouTube channel where he provides free Azure content.

  • Azure Academy
    Dean Cefola (Principle Fast Track Azure engineer) provides free Azure content via his YouTube channel Azure Academy.

  • Adam Stuart
    Adam, a Principal Specialist (Azure Networking at Microsoft) publishes free content related to Azure Networking on his personal YouTube channel.

  • Exam Readiness Zone
    Join experts as they provide tips, tricks, and strategies for preparing for a Microsoft Certification exam. The exam prep videos will help you identify the key knowledge and skills measured on the exam and how to allocate your study time.




    Useful links

  • Azure global infrastructure experience
    A 3D interactive adventure to experience the reach of the sustainable, trusted infrastructure of Microsoft Azure’s cloud platform.

  • Azure Geographies
    Each Azure geography contains one or more regions and meets specific data residency and compliance requirements. This lets you keep your business-critical data and apps nearby on a fault-tolerant, high-capacity networking infrastructure.

  • Azure Updates
    Get the latest updates on Azure products and features to meet your cloud investment needs. Subscribe to notifications to stay informed.

  • Azure Status
    View issues that might be impacting your services

  • Azure Blog
    Stay up to date with the latest Azure news via the Azure Blog

  • List of Azure Blogs
    A list of Azure Blogs owned by the technical community

  • Azure Community Support (Forums)
    Ask your Azure technical questions, find answers, and get Azure support provided by Microsoft engineers, community experts, and validated by customers. New to Q&A? See our get started article below.

  • Microsoft Azure YouTube channel
    Learn about the latest products & solutions, watch training demos, and discover technical insights relevant to you. Invent with purpose with Microsoft Azure.

  • Microsoft Azure Twitter
    The official Twitter account for Microsoft Azure. Follow for the latest news from the Azure team and community.
  • Azure Quickstart Templates
    Deploy Azure resources through the Azure Resource Manager with community contributed templates to get more done. Deploy, learn, fork and contribute back.

  • Microsoft Exam questions format
    Find out how Microsoft exams are structured

  • Azure Charts
    Live visual exploration environment for Azure Cloud + ecosystem (non-Microsoft site)

  • Azure Speed Test
    Measuring the latency from your web browser to the Blob Storage Service in each of the Microsoft Azure Data Centers. The latency times are indicative only, and do not represent the maximum performance achievable from Microsoft Azure. Use this website purely as a tool to gauge which Azure Data Center could be the best for your location. (Non-Microsoft site)

  • Azure SLA
    Service-level agreements (SLAs) describe Microsoft’s commitments for uptime and connectivity

  • Azure Calculator
    Calculate your estimated hourly or monthly costs for using Azure.

  • Total Cost of Ownership (TCO) Calculator
    Estimate the cost savings you can realize by migrating your workloads to Azure

  • Azure Architecture Center
    Guidance for architecting solutions on Azure using established patterns and practices.

  • Cloud Adoption Framework
    Proven guidance and best practices that help you confidently adopt the cloud and achieve business outcomes.

  • Microsoft Azure Well-Architected Framework
    The Azure Well-Architected Framework is a set of guiding tenets that can be used to improve the quality of a workload.

  • Azure subscription and service limits, quotas, and constraints
    This document lists some of the most common Microsoft Azure limits, which are also sometimes called quotas.

  • Azure Migrate
    Get all the Azure migration tools and guidance you need to plan and implement your move to the cloud—and track your progress using a central dashboard that provides intelligent insights.

  • Azure Site Recovery
    Deploy replication, failover, and recovery processes through Site Recovery to help keep your applications running during planned and unplanned outages.

  • Practice Tests Official Microsoft Practice Tests are offered by MeasureUp and can help you be prepared on test day.

It takes dedication to earn a new Microsoft skill or certification. After you’ve passed a certification exam or completed your training and are ready to put your new skills to work, be sure to celebrate your achievements with your network.

Note: This is a personal blog. Views are mine and not that of my employer.

How to use Visual Studio (MSDN) credits in a Microsoft 365 Developer tenant

Reading Time: 4 minutes

Important Note: This blog post was created for the purpose of moving Visual Studio subscription credits to a Microsoft 365 developer tenant and should not be used for tenants holding production workloads without planning.


If you were provided with a Visual Studio subscription (previously MSDN subscription) as a Microsoft Certified Trainer, by your employer, or provided a subscription for being a Microsoft MVP, you’ll know that you are entitled to a certain amount of credit per month to build resources in Azure. However, the subscription provides Azure AD Free licenses, not allowing you to benefit from features such as Azure Dynamic Groups, Azure PIM and a number of other awesome features that come with Azure AD P1/P2 licenses.

Did you know that as a developer you can sign up for a free 90 day renewable trial of a 365 Developer Subscription tenant including 25 Microsoft 365 E5 licenses to prototype apps and solutions at the following link Join the Microsoft 365 Developer Program today?

Note: 365 Developer account cannot to be utilised for production usage.

No Azure credits are provided in the 365 developer tenant, therefore, you cannot build Azure resources, but you can utilise the 365 E5 licenses which include Azure AD P2 licenses for development purposes.

An image from the Microsoft website displaying the benefits of a free Microsoft 365 E5 sandbox environment. Details also listed below this image,

What’s included in a Free Microsoft 365 E5 instant sandbox?
Cut your configuration time from days to seconds. Be your own administrator and prototype apps and solutions on your fully pre-provisioned sandbox subscription.

  • Includes 25 user licenses for development purposes
  • Preconfigured for sideloading Teams apps
    Fully loaded sample data with 16 sample users, user data, and content to help you model your solutions.
  • Easy access to pre-provisioned core Microsoft 365 workloads and capabilities (Windows not included), including:
    – All Office 365 apps
    – Everything you need for Power Platform development
    – Office 365 Advanced Threat Protection
    – Advanced analytics with Power BI
    – Enterprise Mobility + Security (EMS) for compliance and information protection
    – Azure Active Directory for building advanced identity and access management solutions

    More info at: Join the Microsoft 365 Developer Program today

Ok, so we are aware of the Visual Studio subscription (previously known as a MSDN subscription). We know that the Visual Studio Subscription includes an amount of credit per month, however, does
not include Azure AD P2 licenses. We also know that the 365 Developer subscription includes 25 Microsoft 365 E5 licenses (for development purposes) which includes Azure AD P2 licenses but does not include credits for building Azure resources. The result, we have two separate tenants, the Visual Studio subscription allows us to build Azure resources and the other for 365 development purposes. This could be an inconvenience as in my case I wanted to be able work from the one tenant without having to switch between tenants, such as switching from Visual Studio subscription to the 365 Developer tenant when required.

Did you know you can move the Visual Studio subscription to your Microsoft 365 developer tenant, allowing you to make use of the credits to build resources and the 25 365 E5 licenses within the same login, no need to switch from one tenant to another and becomes so much more convenient.

In this blog post, I go through the process of moving my Visual Studio subscription credit to a 365 Developer tenant. Here goes,

Invite user from Visual Studio Subscription to 365 Developer tenant steps

1) Login to your Microsoft 365 Developer tenant at portal.azure.com

2) Launch Azure Active Directory

3) Click to create a new user and click invite external user.

Image from Azure AD displaying option to invite user

4) Enter the email address for an account located on your Visual Studio Subscription. In my case I invited the account from my Visual Studio subscription that I use to login to the Azure Portal. I granted the invited guest the global administrator role.

5) Check and accept the invite when it appears in your inbox

How to check Microsoft 365 Developer Tenant is listed in Visual Studio Subscription

6) Once you’ve accepted the invite, login to you Visual Studio tenant, click Azure AD, click overview, and then click manage tenants.

screenshot of the Manage Tenants option available in Azure Active Directory

7) Click refresh, your Microsoft 365 Developer tenant should be listed

How to change Azure Visual Studio subscription to 365 Developer tenant

8) Next, whilst still in your Visual Studio subscription, search and click subscriptions

9) Click on your Visual Studio Subscription

Important Note and reminder before continuing: This blog post was created for the purpose of moving Visual Studio subscription credits to a Microsoft 365 developer tenant and should not be used for tenants holding production workloads.

10) Click the option change directory

11) Select the 365 developer subscription from the drop down and click change.

12) That’s it for now. This process can take up to two hours to complete.

A short blog post, but I hope it was useful and allows you to be more productive when using your Visual Studio subscription and Microsoft 365 Developer tenant.

Part 9: Terraform with Azure – Deploy a VNET and Subnet

Reading Time: 5 minutes

My journey learning Terraform to deploy workloads in Microsoft Azure continues. If you missed the previous posts, please visit the links below.

Part 1: Terraform with Azure – How to install Terraform
Part 2: Terraform with Azure – How to install Azure cli
Part 3: Terraform with Azure – How to Install Visual Studio Code
Part 4: Terraform with Azure – How to install Azure Terraform Plugin in Visual Studio Code
Part 5: Terraform with Azure – Install Git and initialise repository
Part 6: Terraform with Azure – Deploy resources in Azure
Part 7: Terraform with Azure – Deploy a variables file in Terraform
Part 8: Terraform with Azure – Deploy terraform.tfvars file

In this blog post I will go through the process of deploying a VNET, Subnet and a NSG in Azure.

Reminder:
Terraform documentation is great to get started with deploying resources in Microsoft Azure. Check out the following Terraform link for sample code – Docs overview | Terraform Registry

Let’s get started,

  1. Access the Terraform Registry website and locate virtual network – Terraform Virtual Network
  2. Below is the sample code provided by Terraform (link provided in step 1 above). I don’t require the resource group block as I have created one as part of my previous blog post, therefore, it has been removed from the code below.
resource "azurerm_network_security_group" "example" {
  name                = "example-security-group"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
}

resource "azurerm_virtual_network" "example" {
  name                = "example-network"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  address_space       = ["10.0.0.0/16"]
  dns_servers         = ["10.0.0.4", "10.0.0.5"]

  subnet {
    name           = "subnet1"
    address_prefix = "10.0.1.0/24"
  }

  subnet {
    name           = "subnet2"
    address_prefix = "10.0.2.0/24"
    security_group = azurerm_network_security_group.example.id
  }

  tags = {
    environment = "Production"
  }
}

3. I will replace some of the code so it fits with what what I am doing, such as to include my existing resource group, location (UK South) and to make use of additional variables.

I’ll work through each block of code starting with the Network Security Group (NSG)

  • Line 2: I replace “example”, with “demo”
  • Line 3: I create a variable in my variables.tf file and include the value in my terraform.tfvars file. I then replace “example-security-group” with my newly created variable.
  • Line 4: I use an existing variable I created in a previous blog post
  • Line 5: I use an existing variable I created in a previous blog post
1. #Create Network Security Group (NSG)
2. resource "azurerm_network_security_group" "demo" {
3. name                = var.nsg_name
4.  location            = resource_group_location
5.  resource_group_name = resource_group_name
}

Below are screenshots of my variables.tf and terraform.tfvars file

4. Save changes. I move onto the next block of code I copied from the Terraform website. The virtual network (VNET),

  • Line 2: Replace “example” with “demo”
  • Line 3: Create a variable for network name, I replace “example network” with var.network_name
  • Line 4: I use my existing resource group location variable
  • Line 5: I use my existing resource group name variable
  • Line 7: I remove dns_server as I won’t need these for now
  • Line 10: I replace the name “subnet1” with a newly created variable var.subnet_name
  • Line 12: I replace “azurerm_network_security_group.example.id” replacing example.id with demo.id
1.# Create virtual network and address space IP address
2: resource "azurerm_virtual_network" "demo" {
3: name                = var.network_name
4: location            = var.resource_group_location
5: resource_group_name = var.resource_group_name
6: address_space       = ["10.0.0.0/16"]
7: dns_servers         = ["10.0.0.4", "10.0.0.5"]
8:  
9:  subnet {
10:  name           = var.subnet_name
11: address_prefix = "10.0.1.0/24"
12. security_group = azurerm_network_security_group.demo.id

5. I’ll make use of tags, so add a tag named demo

tags = {
    environment = "demo"
  }
}

My variables.tf and terraform.tfvars file below,

6. Before continuing I’ll commit the changes to Git. Note that Git is not a requirement to deploy resources in Azure, but a great versioning tool that is popular. I covered Git in previous blog posts. Continue to step 7 if you do not wish to commit changes to the local Git repository.

  • Execute the command below
git stage .
  • To confirm the files have been staged, type the command below and press enter,
git status
  • Type a short but meaningful description of your choice
git commit -m "Added VNET Subnet and NSG"
  • Finally, the below command to list your commits
git log --oneline

7. Save. Next i run terraform validate to check for errors

Looks good

8. Next, I run terraform plan and the output is shown below,

9. Click save. Next, I run terraform apply, review and then type ‘yes’ to allow Terraform to continue.

10. I log into the Azure Portal and access my resource group, I have a new Virtual Network and Network Security Group located in region UK South.

I click on the new virtual network demo-vnet1, click subnets, and I see my subnet.

I click on demo_subnetA and can see my NSG (ng1demo) attached to demo_subnetA

Finally, here is my tag. I used the name demo

That’s it for now

I hope the journey has been useful to allow you to get started with Terraform.

Thanks for following

Part 8: Terraform with Azure – Deploy terraform.tfvars file

Reading Time: 5 minutes

My journey learning Terraform to allow me to deploy workloads into Microsoft Azure continues. If you missed the previous posts, please visit the links below.

Part 1: Terraform with Azure – How to install Terraform
Part 2: Terraform with Azure – How to install Azure cli
Part 3: Terraform with Azure – How to Install Visual Studio Code
Part 4: Terraform with Azure – How to install Azure Terraform Plugin in Visual Studio Code
Part 5: Terraform with Azure – Install Git and initialise repository
Part 6: Terraform with Azure – Deploy resources in Azure
Part 7: Terraform with Azure – Deploy a variables file in Terraform

Did you know:
A sub directory in Terraform is known as a module. Terraform will only process the *.tf files located in the folder where you run the command terraform plan. If you would like to include configuration from sub directories, then you use the module syntax. For example, If I have a sub directory named networking, which contains my azure network configuration, I can import the networking directory into my working config directory by specifying the below command. We’ll cover more on this as we move on.

module "my_network" {
  source = "./networking"
}

In this blog post I go through the process of compiling a .tfvars file, but before I continue,

What is a .tfvars file?

This is a confusing topic as terraform.tfvars and variables.tf serve a similar role, as in both are variable files. However, a tfvars file stores the default values from a variables.tf file and allows you to override values if required. Still a little confusing, right? Let’s try to work this out by discussing why we would use a tfvars files.

You could create tfvars files to deploy into multiple environments such as prod.tfvars and dev.tfvars. Therefore, the .tf files would hold the default settings that are common among all configurations but the tfvars files could hold different values. Another example of when you could make use of a tfvars file is for applications which have their own unique settings.

Something else to note, Terraform will automatically load the variables from a tfvars file if it’s named terraform.tfvars or *.auto.tfvars and placed in the same directory as your Terraform configuration file. If you wish to execute different named tfvars files, such as, prod.tfvars, staging.tfvars, test.tfvars etc, you can specify a custom tfvars file using the command line parameter -var-file and then specify the path to a variable file. I have specified examples below,

terraform plan -var-file="prod.tfvars"

or 

terraform plan -var-file="app1.tfvars"

So custom named tfvars files can be called upon based on the platform you are deploying to.

Let’s get started from where we left in Part 7. We removed the default values from the variables.tf file, this action resulted in terraform prompting for values when we executed the command terraform plan.

  1. Create a new file named terraform.tfvars

  2. I have loaded both variables.tf and the newly created terraform.tfvars file in a split screen as seen below.

3. In the previous blog post, I removed the default values. For the purpose of this demo, I have hashed the default values as per the screen shot above. If you removed the default values from the variables.tf file, your file will look similar to the one below.

variable "resource_group_name" {
   type = string
  description = "Azure Resource Group Name"
}

variable "resource_group_location" {
   type = string
  description = "Azure Resource Group location"
}

4. I will now copy the text resource_group_name and resource_group_location to the newly created terraform.tfvars file.

5. Next, I input the values for the variables I have copied to the terraform.tfvars file.

My terraform.tfvars file code below,

resource_group_name = "RG-DEMO-PROD1"
resource_group_location = "UK South"


6. Save changes. Next we run terraform plan. Terraform should no longer prompt us to input default values, instead Terraform will automatically recognise the terraform.tfvars file and apply the values. We named the file terraform.tfvars, therefore, the file will be loaded automatically.

Note:
If there was a requirement to run a different named tfvars file such as prod.tfvars, you would specify a command after terraform -plan

Example,

terraform plan -var-file="prod.tfvars"

Type terraform plan -h for a list of available commands

Back to deploying our resource group using the terraform.tfvars file, let’s give it a go. The results are as expected. Terraform has recognised the terraform.tfvars file and not prompted us to insert values manually.

Note:
A terraform.tfstate.backup file is created automatically in case the state file is lost or corrupted and simplifies recovery if needed.


7. So we executed terraform plan and the output shows that our tfvars file was successfully picked up and the values processed by Terraform. Next, we run terraform apply. Review and input ‘yes’

Let’s visit the Azure Portal. The resource group was created successfully.

8. Next, I would like to override a value within the tfvars file, for example, I want to create a resource group but with a name different to the one specified in the terraform.tfvars file. As per the below, my resource group is RG-DEMO-PROD1 and variable name is resource_group_name.

resource_group_name = "RG-DEMO-PROD1"
resource_group_location = "UK South"

9. I type the command below to override the tfvars file for variable resource_group_name. I specify the resource group NEW-RG.

terraform plan -var "resource_group_name=NEW-RG"

10. The result, Terraform reports that the resource group I created earlier will be replaced with the new resource group specified in the command I executed. The old group will be destroyed. I won’t be applying the command below as I only wanted to try out the variable over ride command.


Access the next blog post for part 9, where I deploy a VNET, Subnet, NSG and a tag in Azure. Part 9: Terraform with Azure – Deploy a VNET and Subnet

Thanks for following