Are the arm template's deployment scripts, that integrated into Azure Blueprint support multiline scripts anyhow?
I mean.... like this
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"First": {
"type": "String"
},
"Second": {
"type": "String"
}
},
"resources": [
{
"type": "Microsoft.Resources/deploymentScripts",
"apiVersion": "2020-10-01",
"name": "demoSample",
"location": "[resourceGroup().location]",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/xxxxxx/resourceGroups/xxxxxxxxxxx/providers/Microsoft.ManagedIdentity/userAssignedIdentities/xxxxxxxxxxxx": {
}
}
},
"kind": "AzureCLI",
"properties": {
"azCliVersion": "2.9.1",
"timeout": "PT30M",
"scriptContent": "
Command1
Command2
Command3
",
"cleanupPreference": "OnSuccess",
"retentionInterval": "P1D"
}
}
]
}
, but not:
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"First": {
"type": "String"
},
"Second": {
"type": "String"
}
},
"resources": [
{
"type": "Microsoft.Resources/deploymentScripts",
"apiVersion": "2020-10-01",
"name": "demoSample",
"location": "[resourceGroup().location]",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/xxxxxx/resourceGroups/xxxxxxxxxxx/providers/Microsoft.ManagedIdentity/userAssignedIdentities/xxxxxxxxxxxx": {
}
}
},
"kind": "AzureCLI",
"properties": {
"azCliVersion": "2.9.1",
"timeout": "PT30M",
"scriptContent": "Command1; Command2; Command3",
"cleanupPreference": "OnSuccess",
"retentionInterval": "P1D"
}
}
]
}
Or the only way is to shape it as a VERY LONG SINGLE LINE?
I'm literally stuck with the problem. Single line deployment scripts are very useful anyway, but they look horrible! For the classical arm json template + parameters json file + deployment using New-AzResourceGroupDeployment cmdlet, multiline scripts work just fine, BUT for arm json templates inside the blueprint, I couldn't make it working.