You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
14
14
15
15
The what-if operation is currently in preview. To use it, you must sign up for the preview.
16
16
@@ -44,7 +44,7 @@ To learn about subscription level deployments, see [Create resource groups and r
44
44
45
45
## Result format
46
46
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`.
48
48
49
49
The following screenshots show the two different output formats:
50
50
@@ -58,9 +58,9 @@ The following screenshots show the two different output formats:
58
58
59
59
## Run what-if operation
60
60
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
62
62
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.
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`.
75
77
76
78
```azurepowershell-interactive
77
79
New-AzDeploymentWhatIf `
@@ -89,7 +91,9 @@ Notice at the top of the output that colors are defined to indicate the type of
89
91
90
92
At the bottom of the output, it shows the sku name (storage account type) will be changed from **Standard_LRS** to **Standard_GRS**.
91
93
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.
0 commit comments