Add FQDNs parameter to VirtualMachine class in azure.mgmt.compute.v2020_06_01.models.VirtualMachine
Is your feature request related to a problem? Please describe. I'd like to retrieve VM FQDNs with Python to compare them with DNS Zone Cname record canonical names.
Describe the solution you'd like
Currently, the VirtualMachine class defined in azure.mgmt.compute.v2020_06_01.models.VirtualMachine does not have the FQDN member variable. See: https://docs.microsoft.com/en-us/python/api/azure-mgmt-compute/azure.mgmt.compute.v2020_06_01.models.virtualmachine?view=azure-python
Adding that member variable would make it very easy to find the FQDN / domain name of a VM resource.
Describe alternatives you've considered The azure cli lets you retrieve the FQDNs of a VM as follows:
az vm show --show-details --resource-group <rg_name> --name <vm_name> --query "[fqdns]"
I thought of running this command inside my Python code, but this defeats the purpose in my situation since I am using managed identities and not CLI credentials in my code (an Azure function). Also, Azure functions written in Python appears to not support CLI-usage with ease, as indicated here: https://stackoverflow.com/questions/59354593/run-azure-cli-commands-from-a-azure-function-app#:~:text=Azure%20function%20does%20not%20support,create%20resources%20and%20manage%20them.
I have also thought of comparing DNS Zone canonical names to VM names, but VM names are arbitrary and may change over time, whereas the FQDNs, albeit also possible to change, appear more static. Consequently, under those assumptions, using VM names is less reliable than using VM public DNS names when comparing them to DNS Zone CName record canonical names.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @avirishuv, @vaibhav-agar, @amjads1.
Thanks for picking this up! Any information wrt resolution time?
@r3mattia Let me look into this, will get back with more information.
@avirishuv Any updates?
Any updates on this? Thanks....
hi @r3mattia apologies for the delay, still investigating internally.
@avirishuv thanks for the update. It would be great if you could let me know when this gets picked up.
@r3mattia could you please take a look at the properties exposed on the network interface resource, documented here: https://docs.microsoft.com/en-us/rest/api/virtualnetwork/networkinterfaces/get Does the FQDN provided here meet your requirements?
hi @r3mattia please let us know if you had a chance to look at the properties documented here, and whether the FQDN provided here meets your requirements? https://docs.microsoft.com/en-us/rest/api/virtualnetwork/networkinterfaces/get
Hey @avirishuv thank you for the update. I will get back to you soon with information.
Hi @r3mattia, where you able to look into the suggestion from Avi?
Closing this out due to no response after a proposed solution was provided.