I am trying to convert my logic app ARM template into pulumi . But it is not accepting my connection parameters in the form of JSON. I need to pass my github connection details in the logic app steps
Can you tell me how to do this in pulumi python?
"parameters": {
"$connections": {
"value": {
"github": {
"connectionId": "/subscriptions/b417b96c-ff1e-4d07-bc32-74bd70a2a033/resourceGroups/task/providers/Microsoft.Web/connections/github",
"connectionName": "github",
"id": "/subscriptions/b417b96c-ff1e-4d07-bc32-74bd70a2a033/providers/Microsoft.Web/locations/eastus/managedApis/github"
}
}
}
My code
example_action_custom = azure.logicapps.ActionCustom("exampleActionCustom",
logic_app_id=example_workflow.id,
name= "Create_a_repository_using_a_template",
body="""{
"inputs": {
"body": {
"name": "cog-chalnge-pmi-shah-@{triggerBody()?['ghusername']}",
"owner": "@triggerBody()?['ghusername']",
"private": true
},
"headers": {
"Accept": "application/vnd.github.baptiste-preview+json"
},
"host": {
"connection": {
"name": "@parameters('$connections')['github']['connectionId']"
}
},
"method": "post",
"parameters": {
"$connections": {
"value": {
"github": {
"connectionId": "/subscriptions/b417b96c-ff1e-4d07-bc32-74bd70a2a033/resourceGroups/bluecode_test_task/providers/Microsoft.Web/connections/github",
"connectionName": "github",
"id": "/subscriptions/b417b96c-ff1e-4d07-bc32-74bd70a2a033/providers/Microsoft.Web/locations/eastus/managedApis/github"
}
}
}
},
"path": "/repos/@{encodeURIComponent('')}/@{encodeURIComponent('')}/generate"
},
"runAfter": {},
"type": "ApiConnection"
}
""")
It is not able to create github connector
Useful links which I tried - https://www.pulumi.com/docs/reference/pkg/azure/logicapps/workflow/ https://www.pulumi.com/docs/reference/pkg/azure/logicapps/actioncustom
Parameters cant be passed by azure.logicapps.ActionCustom. I have used another class to pass the workflow azure_native.logic.Workflow.
https://www.pulumi.com/docs/reference/pkg/azure-native/logic/workflow/