Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure CLI inline parameters not working

I'm trying to pass in parameters inline to a ARM template from within PowerShell using the following command:

azure group deployment create -f my_arm_template.json -g myresourcegroup -p '{\"slot\":\"blue\"}' --verbose

and receive the error:

Error converting value "blue" to type 'Microsoft.WindowsAzure.ResourceStack.Frontdoor.Data.Definitions.DeploymentParameterDefinition'. Path 'properties.parameters.slot'

I'm using the example given from this page: https://azure.microsoft.com/en-us/documentation/articles/resource-group-template-deploy/

I have tried without escaping the quotes just like the example and various other ways but every other attempt breaks when trying to validate my template.

UPDATE 1: I have tried this from CMD in addition to Powershell with the same results.

like image 941
Progger Avatar asked Jan 07 '23 16:01

Progger


1 Answers

The problem wasn't the way I was escaping the JSON but it was the value I was giving. Instead of:

{"slot":"blue"}

it should have been:

{"slot":{"value":"blue"}}
like image 120
Progger Avatar answered Jan 15 '23 22:01

Progger