Working with public IP addresses

We just created a NIC, but without the public IP, we can't reach that network interface and the virtual machine associated with it from the public internet. In this recipe, we will create a public IP address and associate it with the network interface.

Azure allocates the public IP address using one of two methods, static or dynamic. An IP address allocated with the static method will not change, irrespective of the power cycle of the virtual machine; whereas, an IP address allocated with the dynamic method is subject to change. In this recipe, we will create a public IP address allocated with the Static method.

Get Ansible 2 Cloud Automation Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.