Hello. I’m trying to set up a VM on Azure using Pu...
# getting-started
Hello. I’m trying to set up a VM on Azure using Pulumi, and I’m following along with this tutorial: Top 5 Things an Azure Developer Needs to Know: VMs | Pulumi Blog I have a couple of questions though. How do I connect to an existing resource group instead of creating a new one? How do I connect using ssh instead of a username and password? I need to create a VM in an existing resource group, install Anaconda on it, install a python package, and sync a directory from local machine to the remote machine. If you could suggest any tutorials or classes I need to look at, it would be great.
Okay. I think I figured out how to use an existing resource group. I just pass in the name of an existing resource group to the VirtualNetwork, PublicIPAddress, NetworkInterface and VirtualMachine constructors. How do I connect to an existing NetworkInterface though? Also, when I try to create the VM based on a marketplace image, I get this error:
Copy code
Code="VMMarketplaceInvalidInput" Message="Creating a virtual machine from Marketplace image or a custom image sourced from a Marketplace image requires Plan information in the request.
When I try to pass in the plan args instantiated as follows:
Copy code
VirtualMachine(…, plan=plan)
, I get this error:
Copy code
User failed validation to purchase resources. Error message: 'You have not accepted the legal terms on this subscription:
Could someone help me please?
I was able to get the VM up based on a custom image I created, but wasn’t able to get it up using a MarketPlace image. For anyone who’s wondering, the API reference docs are very thorough and have a lot of examples: VirtualNetwork API reference If someone could help me get it working with the Marketplace image license issue, that would be great.