Hi all,
We're trying to create a Flow that runs from PowerApps (by pressing a button) and calls for a Json script that deploys a resource in Azure (in our test case a VM and NIC resource). In Flow we use the "Azure Resource Manager - Create or update a Template Deployment" trigger for that.
If we define the Servername, IP address etc directly in the json file (all code copied directly into the "Template" field) and run the PowerApp, the VM etc is created in the defined resource group as expected.
Now we want to make it possible to use input from the PowerApp as a json variable. For instance: We create a TextInput object in the PowerApp to be able to define the ServerName for the VM.
Now the question is: how can we link that input from the text field to the json script/template? I assume we need to reference it somewhere in the json template, but we don't know the syntax I guess. When we use "PowerAppsbutton.Run(textinput.text)" as "OnSelect" value for the button, this is not excepted (we see a "!" next to the button in the App). How can we reference to it in the json template?
Any help is appreciated.
Regards,
Wim van der Heijden
Hi,
thanks for the answer. I'll have a look at the custom API option.
Regards,
Wim
Hi @wimvdh,
The "Azure Resource Manager - Create or update a Template Deployment" is a well defined API interface, which the specified field can't be re-defined. So I don't think using the parameter inside the json is possible through this Action.
You may consider to build your own custom API, following the guide below:
Create a custom API using Azure Resource Manager in Microsoft Flow
You may need to define the API used in your scenario with a swagger.
Note:
The sample Swagger does not define the full set of ARM operations and currently only contains the List all subscriptions operation. You can edit this Swagger or create another Swagger file using the online Swagger editor.
This process can be used to access any RESTful API authenticated using AAD.
Regards