I'd like to automate the deployment of a virtual network (that is peered with another network) and container instance connected to that network. I'd just want to confirm that I'd do the correct steps. I'll be using Azure REST API.
- Deploy a Virtual Network with a subnet
- Create a Peering to the other virtual network
- Create a Network Profile
- Deploy the Container with the created network profile.
Step 3 is a bit weird for me because it's different than what I do in the Azure Portal. In the Portal, I just select the virtual network that I want my container to be connected to. Looking at MSDN Docs it seems to me that REST API requires me to create that Network Profile first. Am I right?