question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[QUERY] - Azure.ResourceManager - could we have an example of making an Arm Deployment with the new Track II SDK?

See original GitHub issue

Library name and version

Azure.ResourceManager

Query/Question

Hi!

I am trying to migrate from Microsoft.Azure.ResourceManager to the new Azure.ResourceManager package, as I want to migrate away from ADAL and to MSAL for organizational requirements. I am trying to understand how to perform these operations with the new Azure.ResourceManager SDK.

//whatIf at ResourceGroup scope
var whatIfResponse = await client.Deployments.WhatIfAsync(resourceGroupName, deploymentName, deploymentWhatIf);

//whatIf at subscription Scope
var whatIfResponse = await client.Deployments.WhatIfAtSubscriptionScopeAsync(deploymentName, deploymentWhatIf);

//deployment at scope 
var deploymentResponse = await client.Deployments.CreateOrUpdateAtScopeAsync(spec.Scope, spec.Name, deployment);

I have looked through the source code on the repo and do not understand the structure used.

Environment

.NET SDK (reflecting any global.json): Version: 6.0.104

Microsoft Visual Studio Enterprise 2022 (64-bit) - Current Version 17.1.6

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

0reactions
david-jarmancommented, May 19, 2022

@ArthurMa1978, thanks for the link, however the code sample does not address the original question which is how to perform a “what-if” before a deployment is actually created. The linked example creates an incremental resource group deployment, and actually creates the resource.

Could you re-open this issue and provide a code example for what-if deployments?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create & deploy template specs - Azure Resource Manager
A template spec is a resource type for storing an Azure Resource Manager template (ARM template) in Azure for later deployment.
Read more >
Quickstart: Create a single database in Azure SQL ...
This quickstart shows you how to create a single database using an Azure Resource Manager template (ARM template). An ARM template is a ......
Read more >
Troubleshoot common Azure deployment errors
Error code Mitigation More inform... AccountNameInvalid Follow naming guidelines for storage accounts. Resolve erro... AccountPropertyCannotBeSet Check available storage account properties. storageAcco... AnotherOperationInProgress Wait for concurrent operation...
Read more >
Deploy resources with REST API and template - Azure ...
Describes the functions to use in an Azure Resource Manager template (ARM template) to retrieve values about deployment scope.
Read more >
Azure Resource Manager template specs in Bicep
Describes how to create template specs in Bicep and share them with other users in your organization.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found