Hey It's been days that I am trying to deploy my first logic app with dynamic resource group name and subscription id using Azure DevOps, I looked on several links that doing something like in my template.json file:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workflows_app_name": {
"defaultValue": "myLogicApp",
"type": "String"
},
"connections_azuretables_externalid": {
"value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/connections/azuretables",
"type": "String"
}
....
tried this too:
"connections_azuretables_externalid": {
"defaultValue": "[concat('/subscriptions/', subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Web/connections/azuretables')]",
"type": "String"
}
and this as well trying to pass resourcegroup name and subscription in paramters:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workflows_app_name": {
"defaultValue": "myLogicApp",
"type": "String"
},
"connections_azuretables_externalid": {
"defaultValue": "[concat('/subscriptions/', parameters('subscriptionId'), '/resourceGroups/', parameters('ressourceGroupName'), '/providers/Microsoft.Web/connections/azuretables')]",
"type": "String"
},
"subscriptionId": {
"type": "String"
},
"ressourceGroupName": {
"type": "String"
},
.....
}
but getting errors similar to this
Property id '[concat('/subscriptions/', parameters('subscriptionId'), '/resourceGroups/', parameters('ressourceGroupName'), '/providers/Microsoft.Web/connections/azuretables')]' at path 'properties.parameters.$connections.value.azuretables.connectionId' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'
I know I am missing or misunderstanding something but can't figure it out! Thanks.