Get-AzResourceGroupDeploymentWhatIfResult Json Output update for type placement
Description of the new feature
Update the Json that is provided with the Get-AzResourceGroupDeploymentWhatIfResult command so that the type column isn't nested within the Before and After sections. Since a resource type would not likely change for a deployment having in each section is redundant.
{
"Scope": "/subscriptions/subscriptionId/resourceGroups/rgName",
"RelativeResourceId": "microsoft.insights/components/applicationInsightsName",
"FullyQualifiedResourceId": "/subscriptions/subscriptionId/resourceGroups/rgName/providers/microsoft.insights/components/applicationInsightsName",
"ChangeType": "Modify",
"ApiVersion": "2018-05-01-preview",
"Before": {
"apiVersion": "2018-05-01-preview",
"id": "/subscriptions/subscriptionId/resourceGroups/rgName/providers/Microsoft.Insights/components/applicationInsightsName",
"kind": "web",
"location": "eastus",
"name": "applicationInsightsName",
"properties": {
"Application_Type": "web",
"IngestionMode": "ApplicationInsights",
"publicNetworkAccessForIngestion": "Enabled",
"publicNetworkAccessForQuery": "Enabled",
"RetentionInDays": 90
},
"tags": {
"CreatedOnDate": "10/23/2020 16:02:10",
"Domain": "SaaS Infrastructure Services"
},
"type": "microsoft.insights/components" <-- Before.type
},
"After": {
"apiVersion": "2018-05-01-preview",
"id": "/subscriptions/subscriptionId/resourceGroups/rgName/providers/Microsoft.Insights/components/applicationInsightsName",
"kind": "web",
"location": "eastus",
"name": "applicationInsightsName",
"properties": {
"Application_Type": "web",
"Flow_Type": "Bluefield",
"IngestionMode": "ApplicationInsights",
"publicNetworkAccessForIngestion": "Enabled",
"publicNetworkAccessForQuery": "Enabled",
"Request_Source": "rest",
"RetentionInDays": 60
},
"tags": {
"CreatedOnDate": "10/23/2020 16:02:10",
"Domain": "SaaS Infrastructure Services"
},
"type": "microsoft.insights/components" <-- After.type
},
"Delta": [
{
"Path": "properties.RetentionInDays",
"PropertyChangeType": "Modify",
"Before": [],
"After": [],
"Children": null
},
{
"Path": "properties.Flow_Type",
"PropertyChangeType": "Create",
"Before": null,
"After": [],
"Children": null
},
{
"Path": "properties.Request_Source",
"PropertyChangeType": "Create",
"Before": null,
"After": [],
"Children": null
}
]
}
Proposed implementation details (optional)
Make a new entry of type/resourceType in the root of the "changes" object, this would be in addition to the Before.type and After.type sections. The addition of this instead of replacement would prevent a the addition of a breaking change to people that have automation around these output files. Idea of example output below.
{
"Scope": "/subscriptions/subscriptionId/resourceGroups/rgName",
"RelativeResourceId": "microsoft.insights/components/applicationInsightsName",
"FullyQualifiedResourceId": "/subscriptions/subscriptionId/resourceGroups/rgName/providers/microsoft.insights/components/applicationInsightsName",
"ChangeType": "Modify",
"type/resourceType": "microsoft.insights/components", <-- New Addition
"ApiVersion": "2018-05-01-preview",
"Before": {
"apiVersion": "2018-05-01-preview",
"id": "/subscriptions/subscriptionId/resourceGroups/rgName/providers/Microsoft.Insights/components/applicationInsightsName",
"kind": "web",
"location": "eastus",
"name": "applicationInsightsName",
"properties": {
"Application_Type": "web",
"IngestionMode": "ApplicationInsights",
"publicNetworkAccessForIngestion": "Enabled",
"publicNetworkAccessForQuery": "Enabled",
"RetentionInDays": 90
},
"tags": {
"CreatedOnDate": "10/23/2020 16:02:10",
"Domain": "SaaS Infrastructure Services"
},
"type": "microsoft.insights/components" <-- Before.type
},
"After": {
"apiVersion": "2018-05-01-preview",
"id": "/subscriptions/subscriptionId/resourceGroups/rgName/providers/Microsoft.Insights/components/applicationInsightsName",
"kind": "web",
"location": "eastus",
"name": "applicationInsightsName",
"properties": {
"Application_Type": "web",
"Flow_Type": "Bluefield",
"IngestionMode": "ApplicationInsights",
"publicNetworkAccessForIngestion": "Enabled",
"publicNetworkAccessForQuery": "Enabled",
"Request_Source": "rest",
"RetentionInDays": 60
},
"tags": {
"CreatedOnDate": "10/23/2020 16:02:10",
"Domain": "SaaS Infrastructure Services"
},
"type": "microsoft.insights/components" <-- After.type
},
"Delta": [
{
"Path": "properties.RetentionInDays",
"PropertyChangeType": "Modify",
"Before": [],
"After": [],
"Children": null
},
{
"Path": "properties.Flow_Type",
"PropertyChangeType": "Create",
"Before": null,
"After": [],
"Children": null
},
{
"Path": "properties.Request_Source",
"PropertyChangeType": "Create",
"Before": null,
"After": [],
"Children": null
}
]
}
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @armleads-azure.
Issue Details
Description of the new feature
Update the Json that is provided with the Get-AzResourceGroupDeploymentWhatIfResult command so that the type column isn't nested within the Before and After sections. Since a resource type would not likely change for a deployment having in each section is redundant.
{
"Scope": "/subscriptions/subscriptionId/resourceGroups/rgName",
"RelativeResourceId": "microsoft.insights/components/applicationInsightsName",
"FullyQualifiedResourceId": "/subscriptions/subscriptionId/resourceGroups/rgName/providers/microsoft.insights/components/applicationInsightsName",
"ChangeType": "Modify",
"ApiVersion": "2018-05-01-preview",
"Before": {
"apiVersion": "2018-05-01-preview",
"id": "/subscriptions/subscriptionId/resourceGroups/rgName/providers/Microsoft.Insights/components/applicationInsightsName",
"kind": "web",
"location": "eastus",
"name": "applicationInsightsName",
"properties": {
"Application_Type": "web",
"IngestionMode": "ApplicationInsights",
"publicNetworkAccessForIngestion": "Enabled",
"publicNetworkAccessForQuery": "Enabled",
"RetentionInDays": 90
},
"tags": {
"CreatedOnDate": "10/23/2020 16:02:10",
"Domain": "SaaS Infrastructure Services"
},
"type": "microsoft.insights/components" <-- Before.type
},
"After": {
"apiVersion": "2018-05-01-preview",
"id": "/subscriptions/subscriptionId/resourceGroups/rgName/providers/Microsoft.Insights/components/applicationInsightsName",
"kind": "web",
"location": "eastus",
"name": "applicationInsightsName",
"properties": {
"Application_Type": "web",
"Flow_Type": "Bluefield",
"IngestionMode": "ApplicationInsights",
"publicNetworkAccessForIngestion": "Enabled",
"publicNetworkAccessForQuery": "Enabled",
"Request_Source": "rest",
"RetentionInDays": 60
},
"tags": {
"CreatedOnDate": "10/23/2020 16:02:10",
"Domain": "SaaS Infrastructure Services"
},
"type": "microsoft.insights/components" <-- After.type
},
"Delta": [
{
"Path": "properties.RetentionInDays",
"PropertyChangeType": "Modify",
"Before": [],
"After": [],
"Children": null
},
{
"Path": "properties.Flow_Type",
"PropertyChangeType": "Create",
"Before": null,
"After": [],
"Children": null
},
{
"Path": "properties.Request_Source",
"PropertyChangeType": "Create",
"Before": null,
"After": [],
"Children": null
}
]
}
Proposed implementation details (optional)
Make a new entry of type/resourceType in the root of the "changes" object, this would be in addition to the Before.type and After.type sections. The addition of this instead of replacement would prevent a the addition of a breaking change to people that have automation around these output files. Idea of example output below.
{
"Scope": "/subscriptions/subscriptionId/resourceGroups/rgName",
"RelativeResourceId": "microsoft.insights/components/applicationInsightsName",
"FullyQualifiedResourceId": "/subscriptions/subscriptionId/resourceGroups/rgName/providers/microsoft.insights/components/applicationInsightsName",
"ChangeType": "Modify",
"type/resourceType": "microsoft.insights/components", <-- New Addition
"ApiVersion": "2018-05-01-preview",
"Before": {
"apiVersion": "2018-05-01-preview",
"id": "/subscriptions/subscriptionId/resourceGroups/rgName/providers/Microsoft.Insights/components/applicationInsightsName",
"kind": "web",
"location": "eastus",
"name": "applicationInsightsName",
"properties": {
"Application_Type": "web",
"IngestionMode": "ApplicationInsights",
"publicNetworkAccessForIngestion": "Enabled",
"publicNetworkAccessForQuery": "Enabled",
"RetentionInDays": 90
},
"tags": {
"CreatedOnDate": "10/23/2020 16:02:10",
"Domain": "SaaS Infrastructure Services"
},
"type": "microsoft.insights/components" <-- Before.type
},
"After": {
"apiVersion": "2018-05-01-preview",
"id": "/subscriptions/subscriptionId/resourceGroups/rgName/providers/Microsoft.Insights/components/applicationInsightsName",
"kind": "web",
"location": "eastus",
"name": "applicationInsightsName",
"properties": {
"Application_Type": "web",
"Flow_Type": "Bluefield",
"IngestionMode": "ApplicationInsights",
"publicNetworkAccessForIngestion": "Enabled",
"publicNetworkAccessForQuery": "Enabled",
"Request_Source": "rest",
"RetentionInDays": 60
},
"tags": {
"CreatedOnDate": "10/23/2020 16:02:10",
"Domain": "SaaS Infrastructure Services"
},
"type": "microsoft.insights/components" <-- After.type
},
"Delta": [
{
"Path": "properties.RetentionInDays",
"PropertyChangeType": "Modify",
"Before": [],
"After": [],
"Children": null
},
{
"Path": "properties.Flow_Type",
"PropertyChangeType": "Create",
"Before": null,
"After": [],
"Children": null
},
{
"Path": "properties.Request_Source",
"PropertyChangeType": "Create",
"Before": null,
"After": [],
"Children": null
}
]
}
| Author: | glloyd2010f |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
Any update on this?
@glloyd2010f Apologies for the delay! we are looking into this, will help you with an update as soon as we get an update from the product owners.
@armleads-azure Can you please help us with an update? awaiting your response.
Another question to tag with this, is there a way to get the "what if" results when leveraging 'New-AzResourceGroupDeployment
@glloyd2010f thank you for your response. Let me check that as well from our product team and get back to you. @armleads-azure Need your help here please
This is a good suggestion, but it's a breaking change which requires a new API version. We'll add this to our team's backlog.
Another question to tag with this, is there a way to get the "what if" results when leveraging 'New-AzResourceGroupDeployment -WhatIf' or 'New-AzDeployment -WhatIf'?? Or will we always need to run a secondary command?
@glloyd2010f You can just use a variable to save the result:
$whatIfResult = New-AzResourceGroupDeployment -WhatIf ...
Closing the issue for now. Please let me know if there are any other questions.