Open alex-frankel opened 4 years ago
This issue leads to large amounts of noise, so +1 from me.
This really needs fixed, it seems to be breaking when I reference a resource deployed in a different Bicep module from the same top level template.
What-If still depressing me even on a SIMPLE template.......
snippet showing the resources from the output of az deployment group validate --verbose
"validatedResources": [
{
"id": "/subscriptions/xxxxxx/resourceGroups/xxxxxx/providers/Microsoft.Resources/deployments/20221012163428_storageAccount",
"resourceGroup": "xxxxxx"
},
{
"id": "/subscriptions/xxxxxx/resourceGroups/xxxxxx/providers/Microsoft.Resources/deployments/20221012163428_keyVault",
"resourceGroup": "xxxxxx"
},
{
"id": "/subscriptions/xxxxxx/resourceGroups/xxxxxx/providers/Microsoft.Storage/storageAccounts/xxxxxxsa",
"resourceGroup": "xxxxxx"
}
]
and the What-If output.......
Note: The result may contain false positive predictions (noise).
You can help us improve the accuracy of the result by opening an issue here: https://aka.ms/WhatIfIssues
Resource and property changes are indicated with this symbol:
+ Create
The deployment will update the following scope:
Scope: /subscriptions/xxxxxx/resourceGroups/xxxxxx
+ Microsoft.Storage/storageAccounts/xxxxxxsa [2021-08-01]
apiVersion: "2021-08-01"
id: "/subscriptions/xxxxxxresourceGroups/xxxxxx/providers/Microsoft.Storage/storageAccounts/xxxxxxsa"
kind: "StorageV2"
location: "eastus2"
name: "xxxxxxsa"
properties.accessTier: "Hot"
properties.supportsHttpsTrafficOnly: true
sku.name: "Standard_LRS"
tags.ApplicationName: "xxxxxx-AzureSharedInfrastructure"
type: "Microsoft.Storage/storageAccounts"
Resource changes: 1 to create.
any updates? Ticket is open more than 4 years...
This bug is creating a lot of noise and uncertainty when attempting to alter deployed bicep code to use modules that utilize existing
resources and their properties. Any updates on this, @alex-frankel?
Describe the noise
Today, what-if/preflight is not able to evaluate/compile the reference() function prior to doing the what-if comparison, which results in noise. On the PUT side, we show
reference().someProperty
and on the GET side we show the evaluated property (since it was evaluated to create the resource in the first place.Will add incoming noise reports that relate to this to this thread