Parameterizing Logic apps without breaking them in Visual Studio

na 146 Reputation points
2023-04-14T14:40:37.1366667+00:00

We are parameterizing logic apps to allow them to be deployed to multiple environments. e.g.

Dev-ResourceGroup contains Dev-ApiManagement and the DevLogicApp.
Prd-ResourceGroup contains Prd-ApiManagement and the PrdLogicApp.

In the logic app, the Azure API connector ID to reference API management is parameterized, so that the Dev logic app connects to the dev API Management and PRD logic App connects to the Prd Api Management.

If i parameterize this value however, i get the below error in visual studio, and cannot add/remove or modify parameters in any way:
User's image

(note the paramaterized vaue for "id" in the below definition for the API connector:

                            "API_Get_xxxxxxx": {
                              "type": "ApiManagement",
                              "inputs": {
                                "method": "get",
                                "pathTemplate": {
                                  "template": "/users/{userid}",
                                  "parameters": {
                                    "userid": "@{encodeURIComponent(variables('PrimaryUserID'))}"
                                  }
                                },
                                "queries": {
                                  "apiKey": "@body('API_Authorization_Key')?['value']"
                                },
                                "api": {
                                  "id": "[concat(parameters('service_API_externalid'), '/apis/myApi')]"
                                }
                              },
                              "runAfter": {}
                            }

If i hard code the id, it works as expected. Hard coding this however makes devops across environments very difficult. Is this a known issue with the logic app tools in visual studio?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
0 comments No comments
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.