Use the Azure metadata Service to query the Public IP Address of VM

Written by James McDonald

March 24, 2022

curl -s -H Metadata:true | jq -r '.network.interface | .[] | .ipv4.ipAddress | .[] | .publicIpAddress'


Submit a Comment

Your email address will not be published.

You May Also Like…

List your VSCode Extensions

Ever wondered what extensions you have installed and want to keep a list? This actually is a good way to audit your...

array_merge vs the + operator

<?php $options = [ 'rootNode' => 'response' ]; // array_merge // the same key appearing later will overwrite echo...