[QUERY] WhatIf deployments in new SDK
See original GitHub issueLibrary name and version
Azure.ResourceManager.Resources 1.0.0-beta.6
Query/Question
In previous versions of the SDK, it was possible to create a “WhatIf” deployment and execute it, as below:
ResourcesManagementClient client = ...
var whatIf = new DeploymentWhatIf(
new DeploymentWhatIfProperties(DeploymentMode.Incremental)
{
Template = "Template stuff here"
}
);
await (await client.Deployments.StartWhatIfAsync("MyResourceGroup", "MyDeployment", whatIf)).WaitForCompletionAsync();
Does the newer version of the SDK have a similar mechanism? I have found similar deployment classes, but they appear to be internalized.
Environment
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Deployments - What If - REST API (Azure Resource ...
Learn more about Resource Management service - Returns changes that will be made by the deployment if executed at the scope of the...
Read more >Template deployment what-if - Azure Resource Manager
The what-if operation doesn't make any changes to existing resources. Instead, it predicts the changes if the specified template is deployed.
Read more >ARM template deployment what-if operation - Evgeny Borzenin
Now, let's change sku from Standard_LRS to Standard_GRS and check the execution plan. New-AzResourceGroupDeployment -ResourceGroupName iac-what- ...
Read more >ARM Template deployment, the what-if option for your ...
In this post, I will show you how to use the new what-if option in the PowerShell cmdlet and how to use it...
Read more >Azure ARM Template Development — Validate with WhatIf
A local development PowerShell script for making ARM template testing easier with the new WhatIf Operation. Originally published at https://mertsenel.tech ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Yao725 That took care of it. The secret sauce was the “CreateResourceIdentifier” method, which solved my primary issue of not knowing how to create a deployment (without executing it as well). Thanks for your help.
@JayDZimmerman Yes, on line 11 the deployment will get executed, I use this because I want to get the
WhatIf
info which comparing to an existing deployment. For you scenario, I think you can take following code in which no deployments get executed as example: