Passing in an object to DeploymentProperties.Parameters fails to serialize and results in ARM deployment rejection
See original GitHub issueCreating an Azure Resource Manager Deployment by specifying the parameters as an object in the request results in the parameters being dropped from serialization:
deployment.Properties = new DeploymentProperties
{
Mode = DeploymentMode.Incremental,
TemplateLink = new TemplateLink("[redacted]"),
Parameters = new
{
diskStorageAccountName = "value",
imageVhdPath = "value",
virtualNetworkName = "value",
virtualNetworkSubnetName = "value",
vmName = value,
vmAdminUserName = "value",
vmAdminPassword = "value"
}
};
generates the following request:
PUT https://management.azure.com/subscriptions/[redacted]/resourcegroups/[redacted]/providers/Microsoft.Resources/deployments/gameserver?api-version=2014-04-01-preview HTTP/1.1
x-ms-client-request-id: [redacted]
accept-language: en-US
Authorization: [redacted]
User-Agent: Microsoft.Azure.Management.Resources.ResourceManagementClient/3.0.0.0
Content-Type: application/json; charset=utf-8
Host: management.azure.com
Content-Length: 200
Expect: 100-continue
{
"properties": {
"templateLink": {
"uri": "[redacted]"
},
"parameters": {},
"mode": "Incremental"
}
}
which results in a 400 result in the status, as parameters are missing from the request.
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
ARM deployment fails when properties are passed an ...
The issue here was that I was passing including name parameter along with other parameters when setting resource properties.
Read more >Quickstart: Troubleshoot ARM template JSON deployments
This quickstart describes how to troubleshoot Azure Resource Manager template (ARM template) JSON deployment errors.
Read more >Consolidated JDK 8 Release Notes
For systems unable to reach the Oracle Servers, a secondary mechanism expires this JRE (version 8u381) on 2023-11-17. After either condition is met...
Read more >Java 8 release changes
Java 8 Release Highlights. This article applies to: Java version(s): 8.0. This page highlights changes impacting end users for each Java release.
Read more >Cloud Management Error - Azure deployment using AR...
Hi All, I am trying out a POC of the cloud portal for our customer. We've created a catalog item using an Azure...
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
this issue is over two years old and I still struggle with it today. I found no other sources on the web and I have no idea how others are doing this. There should be a .Net-way of providing parameters but there isn’t.
I created the working json parameters string from objects in this way to mirror the json parameters template file:
My apologies for this taking so long. Is this still an issue?