Does anyone know who to get utcNow to work as a default parameter like the documentation (https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-date?tabs=json#examples-1) says when deploying via the - task: AzureResourceManagerTemplateDeployment@3
in an Azure Devops Release pipeline?
This works fine when deploying via powershell locally. But using that task in Azure Devops, it doesn't translate the utcNow function?
The tag comes out as the string representation. i.e.
I'm building the tags as a variable. i.e.
// parameters file
"resourceTags": {
"value": {
"Environment": "Dev",
"ApplicationName": "MyApp"
}
},
// parameters
"utcShort": {
"type": "string",
"defaultValue": "[utcNow('d')]"
},
"resourceTags": {
"type": "object"
},
// variables
"lastDeployed": {
"LastDeployed": "[parameters('utcShort')]"
},
"resourceTags": "[union(parameters('resourceTags'), variables('lastDeployed'))]",
utcShort
parameter? – Jason P