When you deploy the template, the property will only change when the template expression resolves to a different value. This behavior happens because what-if compares the current value of the property (such as true or false for a boolean value) with the unresolved template expression. Every time you set a property to a template expression that includes the reference function, what-if reports the property will change. The what-if operation can't resolve the reference function. ~ Microsoft.Network/virtualNetworks/vnet-001 Scope: /subscriptions/./resourceGroups/ExampleGroup The deployment will update the following scope: The text output is: Resource and property changes are indicated with these symbols: When you use what-if in PowerShell or Azure CLI, the output includes color-coded results that help you see the different types of changes. If needed, install the latest version of Azure CLI. To use what-if in Azure CLI, you must have Azure CLI 2.14.0 or later. To install the module, use: Install-Module -Name Az -Forceįor more information about installing modules, see Install Azure PowerShell. To use what-if in PowerShell, you must have version 4.2 or later of the Az module. The what-if operation has the same permission requirements.įor a list of roles and permissions, see Azure built-in roles. For example, to deploy a virtual machine, you need Microsoft.Compute/virtualMachines/write and Microsoft.Resources/deployments/* permissions. To deploy a Bicep file or ARM template, you need write access on the resources you're deploying and access to all operations on the Microsoft.Resources/deployments resource type. To learn more about what-if, and for hands-on guidance, see Preview Azure deployment changes by using what-if on Microsoft Learn. What-if is supported for resource group, subscription, management group, and tenant level deployments. You can use the what-if operation with Azure PowerShell, Azure CLI, or REST API operations. Instead, it predicts the changes if the specified template is deployed. The what-if operation doesn't make any changes to existing resources. Azure Resource Manager provides the what-if operation to let you see how resources will change if you deploy the template. Before deploying an Azure Resource Manager template (ARM template), you can preview the changes that will happen.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |