Skip to content

Commit 87ca8c7

Browse files
Merge pull request #113339 from DCtheGeek/dmc-arm-subbp
Add blueprint def to sub deployments
2 parents 8367168 + 1f1c2de commit 87ca8c7

File tree

3 files changed

+49
-8
lines changed

3 files changed

+49
-8
lines changed

articles/azure-resource-manager/templates/deploy-to-subscription.md

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Deploy resources to subscription
33
description: Describes how to create a resource group in an Azure Resource Manager template. It also shows how to deploy resources at the Azure subscription scope.
44
ms.topic: conceptual
5-
ms.date: 03/23/2020
5+
ms.date: 04/30/2020
66
---
77

88
# Create resource groups and resources at the subscription level
@@ -15,6 +15,7 @@ To deploy templates at the subscription level, use Azure CLI, PowerShell, or RES
1515

1616
You can deploy the following resource types at the subscription level:
1717

18+
* [blueprints](/azure/templates/microsoft.blueprint/blueprints)
1819
* [budgets](/azure/templates/microsoft.consumption/budgets)
1920
* [deployments](/azure/templates/microsoft.resources/deployments) - for nested templates that deploy to resource groups.
2021
* [eventSubscriptions](/azure/templates/microsoft.eventgrid/eventsubscriptions)
@@ -239,11 +240,11 @@ The following example creates a resource group, and deploys a storage account to
239240
}
240241
```
241242

242-
## Create policies
243+
## Azure Policy
243244

244-
### Assign policy
245+
### Assign policy definition
245246

246-
The following example assigns an existing policy definition to the subscription. If the policy takes parameters, provide them as an object. If the policy doesn't take parameters, use the default empty object.
247+
The following example assigns an existing policy definition to the subscription. If the policy definition takes parameters, provide them as an object. If the policy definition doesn't take parameters, use the default empty object.
247248

248249
```json
249250
{
@@ -280,7 +281,7 @@ The following example assigns an existing policy definition to the subscription.
280281
To deploy this template with Azure CLI, use:
281282

282283
```azurecli-interactive
283-
# Built-in policy that accepts parameters
284+
# Built-in policy definition that accepts parameters
284285
definition=$(az policy definition list --query "[?displayName=='Allowed locations'].id" --output tsv)
285286
286287
az deployment sub create \
@@ -307,9 +308,9 @@ New-AzSubscriptionDeployment `
307308
-policyParameters $policyParams
308309
```
309310

310-
### Define and assign policy
311+
### Create and assign policy definitions
311312

312-
You can [define](../../governance/policy/concepts/definition-structure.md) and assign a policy in the same template.
313+
You can [define](../../governance/policy/concepts/definition-structure.md) and assign a policy definition in the same template.
313314

314315
```json
315316
{
@@ -352,7 +353,7 @@ You can [define](../../governance/policy/concepts/definition-structure.md) and a
352353
}
353354
```
354355

355-
To create the policy definition in your subscription, and apply it to the subscription, use the following CLI command:
356+
To create the policy definition in your subscription, and assign it to the subscription, use the following CLI command:
356357

357358
```azurecli
358359
az deployment sub create \
@@ -370,6 +371,32 @@ New-AzSubscriptionDeployment `
370371
-TemplateUri "https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/policydefineandassign.json"
371372
```
372373

374+
## Azure Blueprints
375+
376+
### Create blueprint definition
377+
378+
You can [create](../../governance/blueprints/tutorials/create-from-sample.md) a blueprint definition from a template.
379+
380+
:::code language="json" source="~/quickstart-templates/subscription-level-deployments/blueprints-new-blueprint/azuredeploy.json":::
381+
382+
To create the blueprint definition in your subscription, use the following CLI command:
383+
384+
```azurecli
385+
az deployment sub create \
386+
--name demoDeployment \
387+
--location centralus \
388+
--template-uri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/subscription-level-deployments/blueprints-new-blueprint/azuredeploy.json"
389+
```
390+
391+
To deploy this template with PowerShell, use:
392+
393+
```azurepowershell
394+
New-AzSubscriptionDeployment `
395+
-Name demoDeployment `
396+
-Location centralus `
397+
-TemplateUri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/subscription-level-deployments/blueprints-new-blueprint/azuredeploy.json"
398+
```
399+
373400
## Template samples
374401

375402
* [Create a resource group, lock it and give permissions to it](https://github.com/Azure/azure-quickstart-templates/tree/master/subscription-level-deployments/create-rg-lock-role-assignment).
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
- name: Azure
2+
tocHref: /azure
3+
topicHref: /azure/index
4+
items:
5+
- name: Governance
6+
tocHref: /azure/governance
7+
topicHref: /azure/governance
8+
items:
9+
- name: Blueprints
10+
tocHref: /azure/azure-resource-manager
11+
topicHref: /azure/governance/blueprints

articles/governance/blueprints/toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
- name: Create a blueprint - REST API
1818
displayName: publish, assign, track, unassign, delete
1919
href: create-blueprint-rest-api.md
20+
- name: Create a blueprint - ARM template
21+
displayName: assign, compliance, resource manager
22+
href: ../../azure-resource-manager/templates/deploy-to-subscription.md??toc=/azure/governance/blueprints/toc.json&bc=/azure/governance/blueprints/breadcrumb/toc.json
2023
- name: Tutorials
2124
items:
2225
- name: Create from a blueprint sample

0 commit comments

Comments
 (0)