Skip to the content.

Tools

Quickstart

# https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-macos
brew update && brew install azure-cli

echo "autoload bashcompinit && bashcompinit" >> ~/.zshrc
echo "source $(brew --prefix)/etc/bash_completion.d/az" >> ~/.zshrc


# https://learn.microsoft.com/en-us/azure/developer/terraform/authenticate-to-azure?tabs=bash
az login
az account list --query "[?user.name=='igor.budasov@gmail.com'].{Name:name, ID:id, Default:isDefault}" --output Table

az account set --subscription "4167d2fe-8b0c-banaan-acbe-0b613ec53c33"

# https://learn.microsoft.com/en-us/azure/active-directory/role-based-access-built-in-roles
az ad sp create-for-rbac --name terraform-principal --role Owner --scopes /subscriptions/___________

export ARM_SUBSCRIPTION_ID="xxxxxxxx"
export ARM_TENANT_ID="xxxxx"
export ARM_CLIENT_ID="xxxxxx"
export ARM_CLIENT_SECRET="xxxxxxx"

Azure Shop

AzAPI

The AzAPI provider is a thin layer on top of the Azure ARM REST APIs. The AzAPI provider enables you to manage any Azure resource type using any API version. This provider complements the AzureRM provider by enabling the management of new Azure resources and properties (including private preview).

Benefits

Use the extension https://marketplace.visualstudio.com/items?itemName=azapi-vscode.azapi

More: https://learn.microsoft.com/en-us/azure/developer/terraform/overview-azapi-provider

Logs

alt text

PowerShell

Resource Manager

💡 You can download resources as ARM JSON, edit it and redeploy

💡 Use parameters for settings that vary according to the environment

Compute

Azure Storage offers four data services that can be accessed by using an Azure storage account:

Managed certificates

See Security.md

Authentication/Authorization

PIM

Azure Privileged Identity Management (PIM) is a service in Azure Active Directory (Azure AD) that enables you to manage, control, and monitor access to important resources in your organization. These resources include resources in Azure AD, Azure, and other Microsoft Online Services like Office 365 or Microsoft Intune.

Here are some key features of Azure PIM:

  1. Just-In-Time Privileged Access: You can enable on-demand, time-bound access to Azure resources and Azure AD. This means that users can elevate their access when needed and it will automatically expire after a certain time.

  2. Assignable Roles: Azure PIM supports all roles in Azure RBAC, Azure AD roles, and Azure AD administrative units.

  3. Access Reviews: You can perform access reviews of users with privileged roles to ensure only the right people have access.

  4. Alerts and Notifications: Get alerts when there are changes in the privileged roles assignments.

  5. Audit History: Azure PIM provides reports to audit the activities of privileged operations.

Includes three providers:

Entra ID

alt text

User types

Membership types:

Features

Object Model

Access management in Microsoft Entra ID

AD vs Entra ID

User Account types

OIDC

OpenID Connect (OIDC) is a simple identity layer on top of the OAuth 2.0 protocol, which allows computing clients to verify the identity of an end-user based on the authentication performed by an authorization server, as well as to obtain basic profile information about the end-user in an interoperable and REST-like manner.

In the context of Azure, OIDC is used in Azure Active Directory (Azure AD) to enable applications to authenticate users, and to protect web APIs. It allows clients to verify the identity of the user and to obtain their profile information. Azure AD uses OIDC to authenticate applications in a more secure way than basic authentication.

RBAC

https://learn.microsoft.com/en-us/azure/role-based-access-control/overview

RBAC uses an allow model for access. By default everything is forbidden. Roles summarize: read + write might come from 2 different roles

built-in roles

Object model

Role definition

alt text

Role Assignment

alt text

alt text

User Groups vs. Access Groups

User Groups are used for managing users in Azure AD, while Access Groups (RBAC groups) are used for managing access to Azure resources.

Backup

Network

DCIM

DCIM stands for Data Center Infrastructure Management. It refers to the tools, processes, and methodologies used to manage, monitor, and optimize the physical and logical infrastructure of a data center.

Overlay

A network overlay is a virtual network that is built on top of an existing physical network infrastructure. It allows for the creation of multiple, isolated virtual networks that can run on the same physical hardware. This is achieved by encapsulating the network traffic of the virtual networks within the physical network’s packets, enabling the virtual networks to be abstracted from the underlying physical network.

DNS Private Resolver vs DNS Proxy

Peering

Virtual network peering is nontransitive. The communication capabilities in a peering are available to only the virtual networks and resources in the peering. Other mechanisms have to be used to enable traffic to and from resources and networks outside the private peering network.

There are a few ways to extend the capabilities of your peering for resources and virtual networks outside your peering network:

Source IP affinity

use case for source IP affinity is media upload. In many implementations, a client initiates a session through a TCP protocol and connects to a destination IP address. This connection remains open throughout the upload to monitor progress, but the file is uploaded through a separate UDP protocol.

UDR

Services

  1. Azure Virtual Network (VNet): This is the fundamental building block for your private network in Azure. VNet enables many types of Azure resources, such as Azure Virtual Machines (VM), to securely communicate with each other, the internet, and on-premises networks.

  2. Azure Load Balancer: This provides high availability by distributing incoming traffic among healthy service instances in cloud services or virtual machines in a load balancer set. Azure Load Balancer can also present those services on multiple ports, multiple IP addresses, or both.

  3. Azure VPN Gateway: This sends encrypted traffic across a public connection to an on-premises location, or it can send the traffic across a virtual private network (VPN) tunnel to another virtual network.

    • A virtual network can have only one VPN gateway.
    • Gateway transit is supported for both regional and global virtual network peering.
    • When you allow VPN gateway transit, the virtual network can communicate to resources outside the peering. In our sample illustration, the gateway subnet gateway within the hub virtual network can complete tasks such as:
      • Use a site-to-site VPN to connect to an on-premises network.
      • Use a vnet-to-vnet connection to another virtual network.
      • Use a point-to-site VPN to connect to a client.
    • Gateway transit allows peered virtual networks to share the gateway and get access to resources. With this implementation, you don’t need to deploy a VPN gateway in the peer virtual network.

You can apply network security groups in a virtual network to block or allow access to other virtual networks or subnets. When you configure virtual network peering, you can choose to open or close the network security group rules between the virtual networks.

  1. Azure Application Gateway: This is a web traffic load balancer that enables you to manage traffic to your web applications. It’s Azure’s Application Delivery Controller as a service.
    • Azure Application Gateway offers two primary methods for routing traffic:
      • Path-based routing sends requests with different URL paths to different pools of back-end servers.
      • Multi-site routing configures more than one web application on the same application gateway instance.
    • redirect traffic
    • rewrite HTTP headers
  2. Azure Content Delivery Network (CDN): This is a distributed network of servers that can efficiently deliver web content to users. CDNs store cached content on edge servers in point-of-presence (POP) locations that are close to end users, to minimize latency.

  3. Azure DNS: This provides hosting for your DNS domain, providing name resolution using Microsoft Azure infrastructure. By hosting your domains in Azure, you can manage your DNS records using the same credentials, APIs, tools, and billing as your other Azure services.

  4. Azure Traffic Manager: This is a DNS-based traffic load balancer that enables you to distribute traffic optimally to services across global Azure regions, while providing high availability and responsiveness.

  5. Azure ExpressRoute: This lets you extend your on-premises networks into the Microsoft cloud over a private connection facilitated by a connectivity provider.

  6. Azure Network Watcher: This is a collection of network monitoring and troubleshooting tools. It provides network diagnostic and visualization tools to help you understand, diagnose, and gain insights to your network in Azure.

  7. Azure Firewall: This is a managed, cloud-based network security service that protects your Azure Virtual Network resources. It’s a fully stateful firewall as a service with built-in high availability and unrestricted cloud scalability.

provides private connectivity from a virtual network to Azure platform as a service (PaaS), customer-owned, or Microsoft partner services. Private Link simplifies the network architecture and secures the connection between endpoints in Azure. The service eliminates data exposure to the public internet.

Reserved addresses

192.168.1.0 This value identifies the virtual network address. 192.168.1.1 Azure configures this address as the default gateway. 192.168.1.2 and 192.168.1.3 Azure maps these Azure DNS IP addresses to the virtual network space. 192.168.1.255 This value supplies the virtual network broadcast address.

Network Security Group

It’s essentially a cloud-level firewall. This allows you to control access to your Azure resources and protect them from unwanted traffic.

An NSG contains a list of Access Control List (ACL) rules that allow or deny network traffic to your VM instances in a Virtual Network. The rules can be based on source and destination IP address, port, and protocol.

  1. You create a Network Security Group in Azure.
  2. You define inbound and outbound security rules for that NSG. These rules can allow or deny traffic based on parameters like source IP, destination IP, source port, destination port, and protocol (TCP/UDP).
  3. You associate the NSG with one or more network interfaces or subnets.
  4. Azure applies the NSG’s rules to all traffic entering or leaving the network interfaces or subnets that the NSG is associated with.

You can assign network security groups to a subnet and create a protected screened subnet (also referred to as a demilitarized zone or DMZ). A DMZ acts as a buffer between resources within your virtual network and the internet.

Application Security Group

Is a way to join resources in a group, which can be specified as a source or destination in NSG, in order to simplify specifying individual IP adresses

Default NSG

Private Endpoint

Privately access your services without sending traffic over the Internet.

Azure Private Endpoint is a network interface that connects you privately and securely to a service powered by Azure Private Link. The service could be an Azure service like Azure Storage, Azure Cosmos DB, SQL, etc., or your own Private Link Service.

The private endpoint uses a private IP address from your VNet, effectively bringing the service into your VNet. All traffic to the service can be routed through the private endpoint, so no public internet is required. This helps to secure your network traffic as it doesn’t need to traverse over the public internet.

Access Point

Azure Access Point, also known as Azure Front Door, is a service that offers scalable and secure entry points for fast delivery of your global web applications. It uses the anycast protocol and split TCP-based anycast to ensure high availability and instant scalability.

VPN Gateway

Azure VPN Gateway is a service that can be used to send encrypted traffic between an Azure virtual network and on-premises locations over the public Internet.

Types:

Azure VPN Gateway is not always the best solution for connecting an on-premises environment to the cloud. Azure ExpressRoute is a dedicated, high-speed private connection between an on-premises network and Microsoft cloud services

Advertising routes

Azure vWAN

Azure Virtual WAN is a networking service that brings many networking, security, and routing functionalities together to provide a single operational interface. Some of the main features include:

The Virtual WAN architecture is a hub and spoke architecture with scale and performance built in for branches (VPN/SD-WAN devices)

Azure Virtual WAN is a networking service that allows you to centrally manage and configure routing for your hybrid and multicloud networks. With Virtual WAN, you can connect multiple virtual networks together under a single routing construct called a Virtual WAN hub. This hub acts as a central point that connects all of your spokes (virtual networks) together.

Virtual WAN resources

Routing preference

Azure routing preference enables you to choose how your traffic routes between Azure and the Internet. You can choose to route traffic either via the Microsoft network, or, via the ISP network (public internet). These options are also referred to as cold potato routing and hot potato routing respectively.

Ingress traffic: The global BGP Anycast announcement ensures ingress traffic enters Microsoft network closest to the user. When a user from Singapore accesses Azure resources hosted in Chicago, the traffic enters the Microsoft global network at the Singapore edge POP. The traffic then travels on the Microsoft network to the service hosted in Chicago.

Egress traffic: The egress traffic follows the same principle. Traffic travels most of its journey on Microsoft global network and exits closest to the user. For example, if traffic from Azure in Chicago is destined to a user from Singapore, then traffic travels on the Microsoft network from Chicago to Singapore, and exits the Microsoft network at Singapore edge POP.

Both ingress and egress traffic remain on the Microsoft global network whenever possible. This process is also known as cold potato routing.

VWAN + VPM Gateway

https://learn.microsoft.com/en-us/azure/virtual-wan/connect-virtual-network-gateway-vwan

elationship between Azure VPN Gateway and Azure Virtual WAN.

  1. Azure VPN Gateway:
    • The Azure VPN Gateway is a service that allows you to connect your on-premises networks to Azure securely. It enables Site-to-Site (S2S) VPNs in a similar way to how you would set up and connect to a remote branch office.
    • It uses industry-standard protocols such as IPsec (Internet Protocol Security) and IKE (Internet Key Exchange) to establish secure connections between your on-premises network and Azure resources.
    • Organizations often deploy S2S VPNs to connect branch offices to the same Azure Virtual Network (VNet) while the main corporate WAN (Wide Area Network) is accessed via ExpressRoute. In case of connectivity issues with ExpressRoute, the corporate WAN may also use S2S VPN as a backup path1.
  2. Azure Virtual WAN:
    • Azure Virtual WAN is a networking service that simplifies and optimizes connectivity for branch offices, remote users, and Azure resources.
    • It allows you to create a virtual hub that acts as a central point for connecting various network resources.
    • Key features of Azure Virtual WAN include:
      • Transit connectivity: Full transit between branches, sites, mobile users, and services using Azure’s global infrastructure.
      • Integration with SD-WAN: You can run SD-WAN virtual appliances natively in Azure Virtual WAN2.
      • User VPN (point-to-site) support: Provides secure connectivity for remote users to Azure resources3.

Remember that the terminology distinguishes between VPN Gateway virtual network gateway and Virtual WAN VPN gateway to minimize confusion between the two features4. These services work together to provide secure and efficient connectivity within your Azure environment.

Azure Policy

alt text

Considerations

Create a policy alt text

Subscription

An Azure subscription is a logical unit of Azure services that’s linked to an Azure account. An Azure account is an identity in Microsoft Entra ID or a directory that’s trusted by Microsoft Entra ID, such as a work or school account. Subscriptions help you organize access to Azure cloud service resources, and help you control how resource usage is reported, billed, and paid.

alt text

Features

How to save money

Resource Groups

are at their simplest a logical collection of resources. There are a few rules for resource groups.

Tags

Use them for

Temlates benefits

Bicep

Messaging

  1. Azure Service Bus: It is a fully managed messaging broker that enables reliable cloud-to-cloud and on-premises messaging. Service Bus supports asynchronous messaging patterns such as publish/subscribe, request/reply, and message queuing. It provides advanced features like message ordering, duplicate detection, and session support.

  2. Azure Event Hubs: It is a big data streaming platform designed to handle high-throughput, event-driven workloads. Event Hubs can handle millions of events per second and seamlessly integrate with other Azure services like Azure Functions, Azure Stream Analytics, and Azure Logic Apps. It is commonly used for real-time analytics, ingestion of telemetry data, and log aggregation.

  3. Azure Queue Storage: It is a simple, asynchronous messaging service that allows decoupling and scaling of different components of an application. Queue Storage enables reliable and persistent message delivery with at-least-once delivery semantics. It is often used for creating task queues, handling asynchronous processing, and building distributed systems.

  4. Azure Relay: It provides secure, hybrid connectivity between on-premises applications and the cloud. Relay allows you to expose on-premises services to the internet or securely consume cloud services from on-premises systems. It uses a combination of messaging and connectivity features to facilitate communication across different networks and firewalls.

  5. Azure Notification Hubs: It is a scalable push notification engine that enables sending push notifications to various platforms (iOS, Android, Windows, etc.) from a single backend API call. Notification Hubs abstracts the complexities of individual platform protocols, provides features like message tagging and segmentation, and offers rich telemetry for monitoring and analytics.

Azure ServiceBus

Azure Service Bus is a fully managed messaging and queuing service provided by Microsoft Azure. It allows applications and services to communicate over reliable messaging sessions.

Features

Queues

Topics

Architecture

Azure Event Grid

Azure Event Grid, is a service that routes events from any source to any destination. It’s designed to build applications with event-based architectures.

Azure Event Hub

Azure Event Hubs is a fully managed event ingestion service that can receive and process millions of events per second. It can be used to build real-time streaming pipelines and applications that require low-latency and high-throughput.

Features

Databases

Relational DB

NoSQL Databases

Azure Postgres

Postgres SQL backup

Postgres Flex

Azure Cosmos

Compute

Azure Virtual Machines (VMs): These are on-demand, scalable computing resources. They can be used to deploy a wide range of computing solutions, like applications and servers.

Azure Kubernetes Service (AKS): This is a managed container orchestration service provided by Azure. It simplifies the deployment, scaling, and operations of containerized applications.

Azure Functions: This is a serverless compute service that lets you run event-triggered code without having to explicitly provision or manage infrastructure.

Azure App Service: This is a fully managed platform for building, deploying, and scaling web apps. You can host web apps, mobile app back ends, RESTful APIs, or automated business processes.

Azure Batch: This is a cloud-based job scheduling service that parallelizes and distributes the processing of large volumes of data across many computers.

Azure Container Instances (ACI): This service delivers containers without the need for managing the underlying VMs. It’s a solution for any scenario that can operate in isolated containers, without orchestration.

Azure Service Fabric: This is a distributed systems platform that makes it easy to package, deploy, and manage scalable and reliable microservices and containers.

Azure Logic Apps: This is a cloud service that helps you schedule, automate, and orchestrate tasks, business processes, and workflows when you need to integrate apps, data, systems, and services across enterprises or organizations.

Azure Functions

Azure Container Apps

Container Apps Env

An environment in Azure Container Apps is a logical grouping of resources where you can deploy your applications. It’s a boundary that separates your applications from the rest of your Azure resources. Each environment has its own dedicated compute resources, networking, and security settings. This allows you to manage and scale your applications independently.

Smart detector alert rule

Detects if your application experiences an abnormal rise in the rate of HTTP requests or dependency calls that are reported as failed. The anomaly detection uses machine learning algorithms and occurs in near real time, therefore there’s no need to define a frequency for this signal.

To help you triage and diagnose the problem, an analysis of the characteristics of the failures and related telemetry is provided with the detection. This feature works for any app, hosted in the cloud or on your own servers, that generates request or dependency telemetry - for example, if you have a worker role that calls TrackRequest() or TrackDependency().

Log analytics workspace

Log Analytics collects data from a variety of sources and uses a powerful query language to give you insights into the operation of your applications and resources. Use Azure Monitor to access the complete set of tools for monitoring all of your Azure resources.

  1. Connect a data source
    • Select one or more data sources to connect to the workspace
    • Azure virtual machines (VMs)
    • Windows and Linux Agents management
    • Storage account log
    • System Center Operations Manager
  2. Configure monitoring solutions
    • Add monitoring solutions that provide insights for applications and services in your environment View solutions
  3. Monitor workspace health
    • Create alerts to proactively detect any issue that arise in your workspace
    • Learn more about monitor workspace health

Firewall