2
votes

I'm looking to create endpoints (if that's what its still being called) using the Resource Management deployment mode (arm mode). I am currently using Resource Management deployment mode to create virtual machines in Azure since every article practically recommends that as the preferred way. I created an Ubuntu Linux VM in Azure in hopes to really use Azure as a cloud platform for Linux VMs. Despite the new azure portal constantly evolving (with documentations that could surely improve), I managed to create endpoints via Network Security Group (NSG) resource using the new azure portal. However, I am still unable to create endpoints (if that's what its even called anymore) via the Azure CLI... I just get "error: 'endpoint' is not an azure command. See 'azure help'." message. I've read the Azure docs enough to know that I need to execute azure login command and also execute azure config mode arm command since I used the Resource Management deployment mode to create my vm. when I enter the command azure vm --help, I don't see information regarding vm create endpoint, which leads me to believe this command is not supported for Resource Management mode.

How would I create endpoints, or more specifically Inbound security rules, using Azure CLI if I created an Ubuntu Linux VM using Resource Management deployment mode?

1

1 Answers

3
votes

In ARM mode, endpoint is not available for VM. Instead, you can add a inbound rule to your ARM Network Security Group. Here is how it looks like.

azure network nsg rule create --protocol tcp --direction inbound --priority 1000 \
--destination-port-range 22 --access allow -g TestRG -a TestNSG -n SSHRule

The above command add a rule to the NSQ named TestNSG in resource group TestRG. The rule is named SSHRule which allows TCP inbound traffic through the port 22 with priority 1000.

For more information, see the "Manage rules" of "Manage NSGs using the Azure CLI"