Cloud Computing
Azure Fundamentals: Resource Hierarchy, Entra ID, Compute, Storage and Networking
Beginner10 min readUpdated
Azure names things differently from every other cloud, which makes the first week harder than it needs to be. This guide lays out the resource hierarchy, the identity model, the four compute options you will actually choose between, storage and database services, and virtual networking — with Azure CLI and Bicep examples and a blunt AWS-to-Azure vocabulary table.
What you will learn
- Place resources correctly in the management group, subscription and resource group hierarchy
- Explain how Microsoft Entra ID, role assignments and managed identities control access
- Choose between Virtual Machines, App Service, Azure Kubernetes Service and Azure Functions
- Pick a storage account type, access tier and database service for a given access pattern
- Describe virtual networks, subnets, network security groups and private endpoints
- Deploy a small environment with the Azure CLI and a Bicep template
Most engineers meet Azure after meeting some other cloud, and the friction is rarely conceptual. Regions, virtual machines, object storage and managed databases work the way you expect. What slows people down is that Azure has an extra level of grouping that other providers do not, a directory service with its own permission model layered beside the resource permission model, and a naming convention where the same word means different things depending on context. This guide is aimed at getting past that in one sitting.
We assume you know what a region, an availability zone and the shared-responsibility model are — if not, start with cloud fundamentals. Everything below uses the current service names; where a service was renamed recently, the old name appears once so that older documentation still makes sense.
The resource hierarchy
Azure arranges everything in four nested levels, and knowing which level a setting belongs to saves a great deal of searching.
Microsoft Entra tenant identity boundary — users, groups, app registrations
└── Management group policy and access inherited by everything below
└── Management group (…) up to six levels deep
└── Subscription billing boundary + quota boundary
└── Resource group lifecycle boundary — deploy and delete together
└── Resource a VM, a storage account, a database
A tenant is the directory. One organisation normally has one, and it is where identities live; it is not where resources live.
A subscription is the billing container and the quota container. Every resource belongs to exactly one. Organisations split subscriptions along the lines they want to bill, isolate or limit separately: production versus non-production, one per business unit, one per major platform. Quotas — how many cores of a given VM family you may run in a region — are applied per subscription, which is the practical reason not to run everything in one.
A management group sits above subscriptions and exists so that governance does not have to be repeated. Azure Policy assignments and role assignments applied to a management group are inherited by every subscription beneath it. A typical layout has a root group, then groups for platform and landing zones, then production and non-production beneath those.
A resource group is a folder with teeth. Resources in one can be deployed together, tagged together, granted access together and — importantly — deleted together. Group by lifecycle, not by resource type: everything that is created and destroyed as a unit belongs in the same group.
Identity: Microsoft Entra ID and role assignments
Access in Azure has two halves that beginners frequently conflate.
Microsoft Entra ID (formerly Azure Active Directory) authenticates. It holds users, groups, service principals and application registrations, and it issues tokens. Roles inside Entra ID — Global Administrator, User Administrator, Application Administrator — govern the directory itself: who can create users, consent to applications, or reset passwords.
Azure RBAC authorises actions against resources. A role assignment binds three things: a security principal (user, group, service principal or managed identity), a role definition (a set of allowed operations such as Contributor, Reader, Storage Blob Data Reader), and a scope (management group, subscription, resource group or a single resource). Permissions inherit downwards, so a Reader assignment at subscription scope makes the principal a reader on everything inside it.
Being a Global Administrator in Entra ID does not, by default, give you any permission over resources — a separation that surprises people during their first incident. Conversely, an Owner on a subscription cannot create users.
A managed identity is the feature you should reach for constantly. It gives an Azure resource an identity in the directory that the platform manages: no client secret, no certificate, no rotation. A web app with a managed identity can read a secret from Key Vault or write to a storage account with nothing in its configuration but a resource name.
# Grant a web app's managed identity read access to one storage account
appId=$(az webapp identity assign -g rg-orders-prod -n app-orders --query principalId -o tsv)
scope=$(az storage account show -g rg-orders-prod -n storders --query id -o tsv)
az role assignment create \
--assignee-object-id "$appId" --assignee-principal-type ServicePrincipal \
--role "Storage Blob Data Reader" --scope "$scope"
For anything privileged, add Privileged Identity Management so that roles are activated for a few hours with justification rather than held permanently, and require multi-factor authentication through Conditional Access. The broader design principles are covered in identity and access management.
Compute: four options and how to choose
Azure has many compute services; in practice most decisions come down to four.
| Service | What you deploy | You still manage | Reach for it when |
|---|---|---|---|
| Virtual Machines | A disk image | OS, patching, runtime, scaling sets | Licensed software, legacy apps, custom kernels, GPU work |
| App Service | A container or a code artifact | Application, config, scale rules | Standard web APIs and sites that need managed TLS, slots and autoscale |
| Azure Kubernetes Service | Container manifests | Cluster configuration, node pools, add-ons | Many services, existing Kubernetes skills, portability requirements |
| Azure Functions | Individual functions | Function code and bindings | Event-driven work, glue, spiky or intermittent load |
Virtual Machines come in families named by purpose — B for burstable, D for general purpose, E for memory-optimised, F for compute-optimised, L for storage-heavy. Scale sets group identical VMs behind autoscaling rules and are how you run a VM-based tier in production.
App Service is the fastest route to production for a typical web application. It runs on an App Service Plan, which is the unit you actually pay for and the reason costs surprise people: the plan is billed whether the apps on it receive traffic or not, and several apps can share one plan. Deployment slots let you push to a staging slot, warm it and swap it into production, which gives you zero-downtime releases without any infrastructure work.
Azure Kubernetes Service provides a managed control plane free of charge; you pay for the nodes. It is the right answer when you already run Kubernetes or when the number of services makes a scheduler worthwhile, and the wrong answer for three microservices and no platform team. See Kubernetes fundamentals before committing.
Azure Functions bills per execution on the Consumption plan and scales to zero, at the cost of cold starts. The Premium plan keeps instances warm and gives virtual-network integration; the dedicated plan runs functions on an App Service Plan you already pay for.
Storage accounts, tiers and disks
A storage account is a namespace containing up to four services: Blob (objects), Files (SMB/NFS shares), Queue (simple messages) and Table (key-value rows). Almost all new work uses Blob storage, ideally with hierarchical namespace enabled if analytics tools will read it.
Two settings dominate the bill and the behaviour:
Redundancy. LRS keeps three copies inside one data centre. ZRS spreads copies across availability zones in the region and is the sensible default for anything production. GRS and GZRS asynchronously replicate to a paired secondary region; the read-access variants (RA-GRS, RA-GZRS) let you read the secondary copy during a regional outage.
Access tier. Hot storage costs more per gigabyte-month and less per read; cool, cold and archive reverse that ratio progressively, with archive requiring an explicit rehydration that takes hours. Set a lifecycle management policy rather than moving blobs by hand.
{
"rules": [{
"name": "invoices-lifecycle",
"enabled": true,
"type": "Lifecycle",
"definition": {
"filters": { "blobTypes": ["blockBlob"], "prefixMatch": ["invoices/"] },
"actions": { "baseBlob": {
"tierToCool": { "daysAfterModificationGreaterThan": 30 },
"tierToArchive": { "daysAfterModificationGreaterThan": 180 },
"delete": { "daysAfterModificationGreaterThan": 2555 }
}}
}
}]
}
Managed disks are separate from storage accounts and back virtual machines. The tiers run from Standard HDD through Standard SSD and Premium SSD to Ultra Disk, where you provision IOPS and throughput independently of capacity. Premium SSD v2 is usually the best value for databases on VMs.
Databases
Azure SQL Database is the managed relational default: automatic backups with point-in-time restore, automatic patching, and either a DTU-based purchasing model (a bundled abstraction) or the vCore model (explicit cores and memory, and the only one that supports the Hybrid Benefit for existing licences). The serverless tier auto-pauses an idle database, which is excellent for development environments. Azure Database for PostgreSQL and for MySQL offer the same managed treatment for open-source engines.
Azure Cosmos DB is the globally distributed NoSQL service. Its distinguishing features are turnkey multi-region writes and five explicit consistency levels between strong and eventual, which let you trade latency against staleness deliberately. Capacity is provisioned in request units per second, either fixed or autoscaled, or billed per request in serverless mode. Cosmos DB rewards a data model designed around known access patterns and punishes cross-partition queries; choose it for that shape of workload, not as a general-purpose replacement for SQL.
Azure Cache for Redis covers caching and session state, and Azure Service Bus covers durable messaging with queues and topics when you need ordering, sessions or transactions rather than the simple Storage Queue.
Networking
A virtual network (VNet) is a private address space in one region, divided into subnets. Two VNets can be joined by peering, which is non-transitive: peering A to B and B to C does not connect A to C, and this catches people building hub-and-spoke topologies who expect the hub to route automatically. In hub-and-spoke you place a firewall or network virtual appliance in the hub and add user-defined routes to force traffic through it.
A network security group (NSG) is a stateful allow/deny list of rules evaluated by priority, attachable to a subnet or a network interface. Rules can reference service tags such as Storage or AzureMonitor instead of IP ranges, and application security groups let you write rules against logical groups of VMs rather than addresses.
Private endpoints are the important pattern for platform services. By default a storage account or an Azure SQL database has a public endpoint protected by keys and firewall rules; a private endpoint gives it a private IP inside your VNet so traffic never crosses the internet. Combine it with a private DNS zone so the normal hostname resolves to that private address.
Connecting to on-premises is done with a VPN gateway over the internet or ExpressRoute over a private circuit, and traffic is distributed with Load Balancer (layer 4), Application Gateway (layer 7, with a web application firewall) or Front Door (global, with edge caching).
Infrastructure as code with Bicep
ARM templates are the underlying JSON deployment format; Bicep is a readable language that compiles to them, and it is what you should write. It has no state file — the resource graph in Azure is the state — and deployments are declarative and idempotent.
param location string = resourceGroup().location
param appName string
resource plan 'Microsoft.Web/serverfarms@2023-12-01' = {
name: '${appName}-plan'
location: location
sku: { name: 'P1v3', tier: 'PremiumV3' }
}
resource site 'Microsoft.Web/sites@2023-12-01' = {
name: appName
location: location
identity: { type: 'SystemAssigned' }
properties: {
serverFarmId: plan.id
httpsOnly: true
siteConfig: {
linuxFxVersion: 'JAVA|21-java21'
minTlsVersion: '1.2'
ftpsState: 'Disabled'
}
}
}
output principalId string = site.identity.principalId
az deployment group create \
--resource-group rg-orders-prod \
--template-file main.bicep \
--parameters appName=app-orders \
--what-if # preview the changes before applying them
Terraform is equally viable on Azure and is the better choice if you also manage other providers; the reasoning is in infrastructure as code.
AWS to Azure vocabulary
The mapping is approximate — equivalents differ in capability, not just in name — but it shortens the translation.
| AWS | Azure | Note |
|---|---|---|
| Account | Subscription | Azure adds management groups above it |
| IAM | Entra ID + Azure RBAC | Authentication and authorisation are separate systems |
| IAM role for a workload | Managed identity | Both remove long-lived credentials |
| EC2 | Virtual Machines | Scale sets play the role of Auto Scaling groups |
| Elastic Beanstalk | App Service | App Service is considerably more widely used |
| EKS | Azure Kubernetes Service | AKS control plane has a free tier |
| Lambda | Azure Functions | Consumption plan scales to zero |
| S3 | Blob storage | Blobs live inside a storage account namespace |
| EBS | Managed disks | |
| RDS | Azure SQL Database, Azure Database for PostgreSQL/MySQL | |
| DynamoDB | Cosmos DB | Cosmos offers tunable consistency and multi-region writes |
| VPC | Virtual network | Peering in Azure is non-transitive |
| Security group | Network security group | NSG rules are priority-ordered and can deny |
| CloudFormation | ARM templates / Bicep | Bicep is the language you write |
| CloudWatch | Azure Monitor + Log Analytics | Queried with KQL |
| CloudTrail | Azure Activity Log | |
| Secrets Manager / KMS | Key Vault | One service covers secrets, keys and certificates |
Where beginners go wrong
Putting everything in one subscription. Quotas, policy scope and cost attribution all work at subscription level. Splitting production from non-production early costs nothing and saves a migration later.
Assuming Global Administrator means access to resources. It does not, deliberately. Elevate access explicitly and temporarily when you genuinely need it.
Paying for App Service Plans nobody uses. The plan bills continuously. Development plans left running are the single most common source of an unexplained Azure bill.
Forgetting that peering is not transitive. Spokes cannot reach each other through a hub without routes and an appliance in the middle.
Leaving platform services on their public endpoint. Firewall rules help, but private endpoints plus private DNS are the pattern reviewers expect for anything holding regulated data.
Key takeaways
- Azure nests resources in tenant, management group, subscription and resource group; policy and role assignments inherit downward, and the resource group is the deploy-and-delete unit.
- Entra ID authenticates and its directory roles govern the directory; Azure RBAC authorises resource actions through role assignments scoped anywhere in the hierarchy.
- Managed identities remove stored credentials entirely and should be the default way workloads reach storage, databases and Key Vault.
- Compute choices reduce to VMs, App Service, AKS and Functions; storage decisions are dominated by redundancy and access tier, and lifecycle policies should move data automatically.
- VNets, NSGs, non-transitive peering and private endpoints define the network posture; Bicep or Terraform should describe all of it as code.
Sources and further reading
Frequently asked questions
- What replaced Azure Active Directory?
- Nothing replaced it functionally — it was renamed. Microsoft Entra ID is the same directory service with the same tenant, users, groups, applications and licences; only the branding and some portal navigation changed. Older documentation, SDK class names and a few API endpoints still say Azure AD, and Microsoft has said those identifiers stay for compatibility. When you read material written before the rename, substitute the new name and the content still applies.
- Can a resource group span regions?
- Yes. A resource group has a location of its own, but that location only stores the group's metadata; the resources inside it can live in any region. Teams often keep resources in one region per group anyway, because a resource group is the natural blast radius for a deployment, a role assignment and a delete, and mixing regions inside one makes disaster-recovery reasoning harder than it needs to be.
- Should I use a system-assigned or user-assigned managed identity?
- Use a system-assigned identity when one resource needs access and its lifetime matches that resource — the identity is created and deleted with it, and nothing else can borrow it. Use a user-assigned identity when several resources share the same permissions, when you need the identity to survive a redeployment, or when the role assignments must be granted before the workload exists. Both remove the need to store any credential.
- Is Azure SQL Database the same product as SQL Server?
- It shares the engine but not the operating model. Azure SQL Database is a managed single database or elastic pool with automatic patching, backups and high availability, and it omits server-level features such as SQL Agent, cross-database queries and the filesystem. Azure SQL Managed Instance sits between the two, offering near-complete SQL Server compatibility for lift-and-shift migrations at a higher price and with a slower provisioning time.