2 h (S2.1: 40 min · S2.2: 40 min · S2.3: 40 min)
Module 01 (stNN-GRP-* groups in AU-stNN)
six empty Arvéo resource groups, no tags, no guardrails
40 min
Management group → Subscription → Resource group → Resourceflowchart LR R[Tenant root group] --> A[mg-arveo] A --> P[mg-arveo-prod] A --> H[mg-arveo-nonprod] P --> S1[Production subscription] H --> S2[Training subscription] S2 --> G[rg-stNN-hub] G --> V[vnet-stNN-hub]
| Level | Role | Limit |
|---|---|---|
| Management group | Group subscriptions | 6 levels below root |
| Subscription | Billing, quotas, limits | One trusted tenant |
| Resource group | Shared lifecycle | No nesting |
| Resource | Deployed service | One resource group |
management groups per environment or subsidiary, rarely per team
Resource group = Resources + Shared lifecyclea move changes the resource ID (scripts to update), not its region
Tag = Name + Value (key/value pair)short taxonomy, written BEFORE the first deployment
| Tag | Values | Use |
|---|---|---|
Proprietaire |
stNN |
Owner |
CentreDeCout |
CC-IT-1042 |
Chargeback |
Environnement |
Prod, HorsProd |
Filtering, nightly shutdown |
Application |
Socle, Donnees, PortailClient, SiteLyon |
Functional grouping |
names without accents or spaces (simpler CLI and KQL queries)
Variables: <NN> = two-digit trainee number
ST="st<NN>"
RG_ID=$(az group show --name "rg-${ST}-hub" --query id --output tsv)
az tag update --resource-id "$RG_ID" --operation Merge \
--tags Proprietaire=$ST CentreDeCout=CC-IT-1042 Environnement=Prod Application=Socle
az group list --tag Proprietaire=$ST --query "[].name" --output tsvExpected output:
rg-st07-hubaz group update --tags REPLACES all tags (--operation Merge keeps them)
Controlled cost = Estimate + Track + Alert + Optimize| Tool | Step | Arvéo example |
|---|---|---|
| Pricing calculator | Estimate | Monthly hub cost (firewall, VPN) |
| Cost Management | Track | Costs per group or CentreDeCout tag |
| Budgets | Alert | Email at 80 % actual, 100 % forecast |
| Azure Advisor | Optimize | Underused VM to resize |
[TO VERIFY]a budget ALERTS but stops no resource (action possible via an action group)
Environnement tag + automation)Before (Lyon datacenter): buy servers → 5-year depreciation → fixed cost
After (Azure): pay-as-you-go → evening shutdown → variable cost driven by budget
40 min
Azure Policy = Rule (if) + Effect (then) + ScopeBefore: rule in a wiki → deployment outside France → found at audit (months)
After: Deny policy → deployment rejected → immediate fix (seconds)
start with Audit, switch to Deny once the impact is measured
flowchart LR D[Definition] --> I[Initiative] D --> A[Assignment] I --> A A --> S[Scope: MG, subscription, RG] S --> C[Compliance state]
if / then rule on resource properties"policyRule": {
"if": {
"allOf": [
{ "field": "location", "notIn": "[parameters('listOfAllowedLocations')]" },
{ "field": "location", "notEquals": "global" }
]
},
"then": { "effect": "deny" }
}mode: Indexed (resources with tags and region) or All (resource groups included)parameters: values supplied at assignment (regions, tag name, VM sizes)if condition is true| Effect | Action | Arvéo use |
|---|---|---|
Deny |
Rejects the create or update | Region outside France Central |
Audit |
Logs, flags non-compliant | Measure before denying |
Modify |
Adds or changes tags, properties | Inherit CentreDeCout from RG |
Append |
Adds fields to the request | Default network rule |
Modify and DeployIfNotExists act through the assignment's identity (role required)
Evaluation order = Disabled → Append / Modify → Deny → Audit| Effect | Action | Example |
|---|---|---|
DeployIfNotExists |
Deploys a missing resource | Diagnostic settings |
AuditIfNotExists |
Audits a missing related resource | VM without monitoring agent |
DenyAction |
Blocks an action (delete) | Protect a SQL database |
Disabled |
Turns the rule off | Test, temporary waiver |
AuditIfNotExists / DeployIfNotExists: evaluated AFTER a successful creationVariables: <NN> = two-digit trainee number
ST="st<NN>"
DEF=$(az policy definition list \
--query "[?displayName=='Allowed locations'].name" --output tsv)
az policy assignment create --name "pa-${ST}-loc-hub" \
--display-name "Arveo ${ST} - Allowed regions (hub)" --policy "$DEF" \
--resource-group "rg-${ST}-hub" \
--params '{"listOfAllowedLocations":{"value":["francecentral"]}}'Expected output (excerpt):
"enforcementMode": "Default",
"name": "pa-st07-loc-hub",look the definition up by displayName rather than by ID
[TO VERIFY]az network nsg create --resource-group "rg-${ST}-hub" \
--name "nsg-${ST}-test" --location westeurope
az policy state trigger-scan --resource-group "rg-${ST}-hub" --no-wait
az policy state summarize --resource-group "rg-${ST}-hub" \
--query "results.nonCompliantResources"Expected output (first command, excerpt):
(RequestDisallowedByPolicy) Resource 'nsg-st07-test' was disallowed by policy.| Mechanism | Reach | Use |
|---|---|---|
Exclusion (notScopes) |
Child scope left out | Test resource group |
| Exemption | Resource or scope (Waiver, Mitigated) |
Dated, justified waiver |
DoNotEnforce mode |
Evaluated, never blocks | Measure before Deny |
exemption + expiry date + change ticket = audit trail
40 min
Role assignment = Principal + Role definition + ScopeActions, DataActions)Variables: <GROUP_OBJECT_ID> = Entra object ID of the group
az role assignment create --assignee-object-id "<GROUP_OBJECT_ID>" \
--assignee-principal-type Group --role "Network Contributor" \
--resource-group "rg-${ST}-hub"limit of 4,000 role assignments per subscription (groups = fewer assignments)
| Criterion | Microsoft Entra roles | Azure roles (RBAC) |
|---|---|---|
| Managed object | Directory: users, groups, apps | Resources: VM, network, storage |
| Examples | User Administrator | Owner, Contributor |
| Scopes | Tenant, administrative unit | Management group → resource |
| Practiced in | M1 (AU-stNN) |
M2 (rg-stNN-*) |
Global Administrator ≠ access to Azure resources (elevation of access required)
| Role | Manage resources | Grant access |
|---|---|---|
| Owner | Yes | Yes |
| Contributor | Yes | No |
| Reader | Read only | No |
| User Access Administrator | No | Yes |
| Role Based Access Control Administrator | No | Yes (with conditions) |
flowchart LR MG[Management group] --> SUB[Subscription] SUB --> RG[rg-stNN-app] RG --> VM[vm-stNN-web01]
NotActions removes an action from a role, without denying it if another role grants it[TO VERIFY]{
"Name": "st07-Operateur-VM-Arveo",
"Description": "Start, stop, restart VMs",
"Actions": [ "Microsoft.Compute/virtualMachines/read",
"Microsoft.Compute/virtualMachines/start/action" ],
"NotActions": [],
"DataActions": [],
"AssignableScopes": [ "/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/rg-st07-app" ]
}az role definition list --name "<ROLE>"az role definition create --role-definition @role.jsonstNN prefix)roleDefinitions/write on every AssignableScopes entry (RG Owner)Lock = CanNotDelete (no deletion) | ReadOnly (read only)Microsoft.Authorization/locks/* (Owner, User Access Administrator)az lock create --name "lock-${ST}-shared" --lock-type CanNotDelete \
--resource-group "rg-${ST}-shared" --notes "Arveo shared resources"ReadOnly also blocks POST actions (listing storage keys, starting a VM)
Audit or DoNotEnforce, then switch to DenyCentreDeCout tag on rg-st07-app do to the resources in the group?AuditDenyAppendAuditIfNotExistsrg-st07-hub: what rights on rg-st07-hub?ReadOnly lock on rg-st07-app: can an owner start a VM in the group?