[BUG] ARM template appears to be modified erroneously by the SDK
See original GitHub issueDescribe 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:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Dependency not fixed. Mitigated in SDK. To be released for 1.34.0, around 1st May.
@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.