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.

[BUG] ARM template appears to be modified erroneously by the SDK

See original GitHub issue

Describe the bug

One of the parameters provided in the ARM deployment template appears to be modified incorrectly by the Azure SDK. I’m upgrading the SDK in our system from version 1.18.0 to 1.32.1 and it was working fine on version 1.18.0.

Parameter in the template before submitting deployment request:

{
    "properties": {
        "template": {
            "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
            "contentVersion": "1.0.0.0",
            "parameters": {
                ...
                ...
                "sfcUserAssignedIdentities": {
                    "type": "object",
                    "defaultValue": {
                        "/subscriptions/<redacted>/resourceGroups/<redacted>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<redacted>": {}
                        }
                    }
                },

Parameter after submitting the deployment request. The resource Id is broken down into a json fragment. I captured this by adding a logging interceptor on the client side and also observed the same through deployment history on Azure portal.

{
    "properties": {
        "template": {
            "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
            "contentVersion": "1.0.0.0",
            "parameters": {
                ...
                ...
                "sfcUserAssignedIdentities": {
                    "type": "object",
                    "defaultValue": {
                        "/subscriptions/<redacted>/resourceGroups/<redacted>/providers/Microsoft": {
                            "ManagedIdentity/userAssignedIdentities/<redacted>": {}
                        }
                    }
                },

Code for submitting deployment request:

azure.deployments().define(deplName)
     .withExistingResourceGroup(rgName)
     .withTemplate(templateJson)
     .withParameters("{}")
     .withMode(DeploymentMode.INCREMENTAL)
     .beginCreate();

Exception or Stack Trace NA

To Reproduce Provided in the description

Code Snippet Provided in the description

Expected behavior The SDK should not modify the ARM template in an inconsistent way.

Screenshots NA

Setup (please complete the following information):

  • OS: Linux
  • IDE : IntelliJ
  • Version of the Library used: 1.32.1

Additional context Add any other context about the problem here.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
weidongxu-microsoftcommented, Apr 23, 2020

Dependency not fixed. Mitigated in SDK. To be released for 1.34.0, around 1st May.

1reaction
weidongxu-microsoftcommented, Apr 15, 2020

@SukruthKS Good to know the workaround works.

I will continue work with owner of the dependency lib on the fix to root cause. If things work as expected, next release (1.34.0, scheduled on 1st May) should have it fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ARM Template Deployment - Nested Template Bug? - MSDN
I am trying to deploy an ARM template from a PowerShell script in Azure Automation. This ARM template takes advantage of nested templates....
Read more >
ARM template should not delete and replace application ...
I created an ARM template to deploy and manage two Azure Functions across multiple environments (CI, DEV, QA, PROD, etc).
Read more >
Arm Template - Why am I getting an error saying resource is ...
Referencing the templates from your earlier question, it appeared that the dependsOn was not configured correctly.
Read more >
ARM Template deployment bug in Azure Stack - Crying Cloud
I tried to deploy a template I modified back in January to a customer's Azure Stack stamp that was at the latest update...
Read more >
Fixed issues in InDesign - Adobe Support
InDesign hangs due to an issue with SDK resulting in a loop condition. ... Every alternate character of the composite font appears incorrectly...
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