Skip to content

Commit 0a70738

Browse files
committed
update what-if
1 parent f7bf807 commit 0a70738

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

articles/azure-resource-manager/template-deploy-what-if.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.author: jgao
1010
---
1111
# Resource Manager template deployment what-if operation
1212

13-
Before deploying a template, you can preview the changes that will happen. Azure Resource Manager provides the what-if operation to let you see how resources will be changed if you deploy the template. The what-if operation doesn't make any changes to existing resources. Instead, it predicts the changes if the specified template is deployed. Use this feature to make sure your template doesn't make any unexpected changes.
13+
Before deploying a template, you might want to preview the changes that will happen. Azure Resource Manager provides the what-if operation to let you see how resources will change if you deploy the template. The what-if operation doesn't make any changes to existing resources. Instead, it predicts the changes if the specified template is deployed.
1414

1515
The what-if operation is currently in preview. To use it, you must sign up for the preview.
1616

@@ -44,7 +44,7 @@ To learn about subscription level deployments, see [Create resource groups and r
4444

4545
## Result format
4646

47-
You can control the level of detail that is returned about the predicted changes. Use the `-ResultFormat` parameter to set whether you want only a list of resources that will change or whether that list of resources should also include details about the properties that will change. To see all properties, set the result format to `FullResourcePayloads`. To see only which resources will change, set the result format to `ResourceIdOnly`. The default value is `FullResourcePayloads`.
47+
You can control the level of detail that is returned about the predicted changes. Set the `ResultFormat` parameter to `ResourceIdOnly` to get a list of resources that will change. Set the `ResultFormat` parameter to `FullResourcePayloads` to get a list of resources what will change and details about the properties that will change. The default value is `FullResourcePayloads`.
4848

4949
The following screenshots show the two different output formats:
5050

@@ -58,9 +58,9 @@ The following screenshots show the two different output formats:
5858

5959
## Run what-if operation
6060

61-
To see how what-if works, let's runs some tests. You'll deploy a template from [Azure Quickstart templates that creates a storage account](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-storage-account-create/azuredeploy.json). The default storage account type is `Standard_LRS`.
61+
### Set up environment
6262

63-
To set up your environment, deploy a storage account resource with the default **Standard_LRS** storage account type.
63+
To see how what-if works, let's runs some tests. First, deploy a template from [Azure Quickstart templates that creates a storage account](https://github.com/Azure/azure-quickstart-templates/blob/master/101-storage-account-create/azuredeploy.json). The default storage account type is `Standard_LRS`. You'll use this storage account to test how changes are reported by what-if.
6464

6565
```azurepowershell-interactive
6666
New-AzResourceGroup `
@@ -71,7 +71,9 @@ New-AzResourceGroupDeployment `
7171
-TemplateUri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-storage-account-create/azuredeploy.json"
7272
```
7373

74-
After the deployment completes, you're ready to test the what-if operation. Run the what-if command but set the storage account type to `Standard_GRS`.
74+
### Test modification
75+
76+
After the deployment completes, you're ready to test the what-if operation. Run the what-if command but change the storage account type to `Standard_GRS`.
7577

7678
```azurepowershell-interactive
7779
New-AzDeploymentWhatIf `
@@ -89,7 +91,9 @@ Notice at the top of the output that colors are defined to indicate the type of
8991

9092
At the bottom of the output, it shows the sku name (storage account type) will be changed from **Standard_LRS** to **Standard_GRS**.
9193

92-
The what-if operation supports using [deployment mode](deployment-modes.md). The following example tests deploying a [template that has no resources defined](https://github.com/Azure/azure-docs-json-samples/blob/master/empty-template/azuredeploy.json).
94+
### Test deletion
95+
96+
The what-if operation supports using [deployment mode](deployment-modes.md). When set to complete mode, resources not in the template are deleted. The following example deploys a [template that has no resources defined](https://github.com/Azure/azure-docs-json-samples/blob/master/empty-template/azuredeploy.json) in complete mode.
9397

9498
```azurepowershell-interactive
9599
New-AzDeploymentWhatIf `

0 commit comments

Comments
 (0)