Reputation: 2405
I have a logic app with parameters added using "Parameters" in Logic App Designer.
This parameters, have default value, such as parameters of an ARM Template, but are defined in the workflow resource. For instance "Parameterworkflows1"
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"ParameterARM1" : {
"defaultValue": "value",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Logic/workflows",
"apiVersion": "2017-07-01",
"name": "name of workflow",
"properties": {
"state": "Enabled",
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"Parameterworkflows1": {
"defaultValue": "value## Heading ##",
"type": "String"
},
}...
When I want to export template to deploy the Logic App in another resource group and subscription, I can't set up this parameters, because are not parameters of the deployment template, but parameters of the resource(workflow).
In the example above, I have "ParameterARM1" that I can provide, but I can't provide "Parameterworkflows1".
How can I add "Parameterworkflows1" in the section parameters of the deployment template in order to provide all parameters using "export template". It seems that I can modify workflow resource but I can't modify ARM template of the logic app.
I want this result for the logic app
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"ParameterARM1" : {
"defaultValue": "value",
"type": "String"
},
"Parameterworkflows1": {
"defaultValue": "value",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Logic/workflows",
Upvotes: 0
Views: 178
Reputation: 6778
You need to edit the exported Logic App template manually to make deployments to different environments with different parameters convenient.
E.g. you could change it to look like this:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"ParameterARM1" : {
"defaultValue": "value",
"type": "String"
},
"ParameterARMworkflows1" : {
"defaultValue": "value## Heading ##",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Logic/workflows",
"apiVersion": "2017-07-01",
"name": "name of workflow",
"properties": {
"state": "Enabled",
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"Parameterworkflows1": {
"type": "String"
}
},
...
},
"parameters": {
"Parameterworkflows1": {
"value": "[parameters('ParameterARMworkflows1')]"
}
}
}
}
]
}
Of course, you'd also need to use parameter files like this:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"ParameterARMworkflows1": {
"value": "value## Heading ##"
}
}
}
See the following articles for inspiration:
Upvotes: 0