Azure Resource Group Provisioning from Service Request
When a landing-zone request is approved (Freshservice/Dataverse/Form), the flow provisions a new Azure resource group via Azure Resource Manager with the standard tags, applies a policy assignment and RBAC role assignments, sets a budget, and emails the requester the details. Posts to Teams. Gives teams self-service, governed environments without manual setup.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow delivers self-service, governed Azure environments. When a landing-zone request row is created in Dataverse, the flow gates it through a platform Approval, then provisions a new resource group via Azure Resource Manager with the org-standard tags, assigns a baseline policy and an RBAC role, sets a monthly Cost Management budget, writes the outcome back to the request row, emails the requester, and posts a summary to Teams. Rejected requests are recorded and the requester is notified.
Why it matters: Hand-built environments drift from standards and slow teams down. Templated, approval-gated provisioning gives developers what they need quickly while guaranteeing tags, policy, access, and budget are correct from day one — with a full Dataverse audit trail.
> Status: Built (ships Off). Going live requires only authorizing the four connections and setting the environment-variable values (no logic changes).
Use Case
A platform / cloud-governance team wants developers to request an environment and receive a correctly-governed resource group automatically — no manual setup, no missed guardrails. Each request is captured as a Dataverse row, reviewed via Approvals, and on approval the resource group is created with guardrails and a budget already in place.
Flow Architecture
When a landing zone request is created
Dataverse SubscribeWebhookTriggerFires on a new row in flowlibs_landingzonerequest (message = Create)
Initialize Correlation Id
InitializeVariableguid() stamped on the row + every notification for end-to-end tracing
Initialize Resource Group Name
InitializeVariable{team}-{purpose}-rg (lower-cased) naming convention
Initialize Location
InitializeVariableAzure region from request, default eastus
Initialize Resource Group Scope
InitializeVariableFull ARM scope /subscriptions/{sub}/resourceGroups/{rg} reused by every ARM call
Start Landing Zone Approval
Approvals StartAndWaitForAnApprovalPlatform approval gate (Basic); waits for outcome
Check Approval Outcome
Condition (If)Branches on outcome == 'Approve'
Create Resource Group
HTTP PUT (ARM)Create RG with standard tags — …/resourcegroups/{rg}?api-version=2021-04-01
Assign Baseline Policy
HTTP PUT (ARM)Policy assignment at RG scope — …/policyAssignments/…?api-version=2022-06-01
Assign Rbac Role
HTTP PUT (ARM)Role assignment (default Contributor) to the team principal — …/roleAssignments/{guid}?api-version=2022-04-01
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_AzureSubscriptionId | String | <configure> | Target subscription for the RG (reused) |
| flowlibs_AzureTenantId | String | <your-tenant-id> | AAD tenant for the SP OAuth (reused) |
| flowlibs_AzureClientId | String | <configure> | Service-principal client id (reused) |
| flowlibs_AzureClientSecret | String | <configure> | Service-principal secret (reused) |
| flowlibs_ArmBaseUrl | String | https://management.azure.com | ARM base URL (audience = +/); sovereign-cloud portable (reused) |
| flowlibs_StandardTags | String | {"ManagedBy":"FlowLibs","Provisioning":"Automated","Environment":"Dev"} | Tags every RG must carry (@json(...)) (new) |
| flowlibs_PolicyDefinitionId | String | /providers/Microsoft.Authorization/policyDefinitions/<configure> | Baseline policy definition assigned to the RG (new) |
| flowlibs_RbacRoleDefinitionId | String | b24988ac-6180-42a0-ab88-20f7382dd24c | Role definition GUID granted to the team (Contributor) (new) |
| flowlibs_RbacPrincipalId | String | <configure> |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Approvals | shared_approvals | StartAndWaitForAnApproval |
| Microsoft Dataverse | shared_commondataserviceforapps | SubscribeWebhookTrigger UpdateRecord |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
| Microsoft Teams | shared_teams | PostMessageToConversation |
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Naming convention
- Edit Initialize Resource Group Name to change the {team}-{purpose}-rg pattern (e.g. add the environment type or a region code).
- Bicep / ARM template
- After Create Resource Group, add an HTTP PUT …/deployments/{name}?api-version=2021-04-01 to deploy a baseline template (networking, logging, Key Vault) into the new RG.
- Expiry & auto-clean
- Add an expiresOn tag from the request and a companion scheduled flow that deallocates/deletes temporary environments past expiry.
- Richer budget alerts
- Extend Set Resource Group Budget notifications with Forecasted thresholds or additional contact roles/groups.
- Principal type
- Assign Rbac Role defaults principalType to Group; change to User / ServicePrincipal to match the request, or read the principal id from the request row instead of the env var.
- Trigger source
- The Dataverse trigger can be swapped for a Form/Freshservice front end that creates the request row; the rest of the flow is unchanged.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Resource group name
Builds the lower-cased {team}-{purpose}-rg name from the request row.
EXPR.02RG scope
Full ARM scope reused by every provisioning call.
EXPR.03ARM OAuth audience
Derives the OAuth audience from the ARM base URL.
EXPR.04Role definition id
Builds the full role-definition resource id for the RBAC assignment.
EXPR.05Tags payload
Parses the standard-tags env var into a JSON object for the RG.
EXPR.06Budget amount (number)
Casts the budget env var to an integer.
EXPR.07Approval outcome gate
True when the approver approved the request.
EXPR.08Approver comments
Pulls the approver's comment text from the approval response.
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.